SOURCE CODE:
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("enter alpahbet:");
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
printf("\nThe reverse character is %c.",ch);
}
else if(ch>=97 && ch<=122)
{
ch=ch-32;
printf("\nThe reverse character is %c.",ch);
}
else
{
printf("\ninvalid input.");
}
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("enter alpahbet:");
ch=getche();
if(ch>=65 && ch<=90)
{
ch=ch+32;
printf("\nThe reverse character is %c.",ch);
}
else if(ch>=97 && ch<=122)
{
ch=ch-32;
printf("\nThe reverse character is %c.",ch);
}
else
{
printf("\ninvalid input.");
}
getch();
}
No comments :
Post a Comment