Input a character. If the character is between ‘A’-‘Z’ convert to small letter. If the character is between ‘a’-‘z’ convert to capital letter.
#include <stdio.h>
void main ()
{
char a ;
printf("enter letter= ");
scanf("%c", &a);
if("a>=97
&& a<=122")
printf("capital
letter:%c\n", a-32);
if("a>=65
&& a<=90")
printf("small letter:%c\n", a+32);
}
Comments
Post a Comment