Code In Tech - The Ultimate World of Computer Technology

Saturday 24 March 2012

C Program to Find the reverse alpahbet

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();
}

No comments :

Post a Comment