C-Program to Small letter and Capital letter Conversion using Library Function
#include<stdio.h>
#include<ctype.h>
main ()
{
char i,c;
printf("Enter the character\t");
scanf("%c",&c);
i=c;
if((c>=65)&&(c<=90))
{
c=tolower(c);
printf("Small letter of %c is %c",i,c);
}
else
{
if((c>=97)&&(c<=122))
c=toupper(c);
printf("Capital letter of %c is %c",i,c);
}
}
 |
| output |
No comments:
Post a Comment