// Program for putchar
#include
#include
#include
void main()
{
clrscr();
char alpha;
printf("press any alphabet : ");
alpha=getchar();
if (islower (alpha))
{
printf("after changing case alpha is : ");
putchar(toupper (alpha));
}
else
{
printf("after changing case alpha is : ");
putchar(tolower (alpha));
}
getch();
}
Algorithm
· Start
· Declare alpha as character
· Write("any alphabet ")
· alpha=getchar()
· if (islower (alpha))
· Read("after changing case alpha is ")
· putchar(toupper (alpha))
· Else
· Read("after changing case alpha is ")
· putchar(tolower (alpha))
· Stop
c language example codes for write c program
ReplyDeletec Program example to Convert Numbers into Words