N. Char – Codeforces Problem Solution in C

Disclaimer: Make sure you tried enough before checking the solution

Problem: https://codeforces.com/group/MWSDmqGsZm/contest/219158/problem/N

//https://codeforces.com/group/MWSDmqGsZm/contest/219158/problem/N
//ASCII code to find if a letter is capital or not
#include<stdio.h>
int main() {
    char c;
    scanf("%c",&c);
    if(c>=65 && c<91){
        printf("%c",c+32);
    }
    else{
        printf("%c",c-32);
    }
    return 0;
}

Assiut University Training – Newcomers solution

Leave a Comment