/* * File: Upper to lower and viseversa * *Program that will input a character. If the character is in lower case, i.e., between 'a' to 'z', it will output the corresponding upper case character. If it is in upper case, it will output the corresponding lower case. If it is not a letter, e.g., '1', it will output the character as it is * Created on 13 August, 2010, 4:20 PM */ #include int main() { char a; printf("\nEnter the charecter:"); scanf("%c",&a); if('a'<=a && a<='z') { printf("\nCorresponding Uppercase:%c\n",a-32); } else { if('A'<=a && a<='Z') printf("\nCorresponding Lowercase:%c\n",a+32); else printf("\nThe charecter you entered is not a valid letter!\n"); } }