see

A

WAP to take any single alphabet as input and find out if user has entered it in upper case or lower case using switch.



WAP to take any single alphabet as input and find out if user has entered it in upper case or lower case using switch.


#include<stdio.h>
#include<conio.h>
void main()
{
 int j;
 char i;
 clrscr();
 printf("Enter the Alphabet ");
 scanf("%c",&i);
 if(i>='A' && i<='Z')
 j=1;
 else if(i<'z' && i>='a')
 j=2;
 switch(j)
   {
     case 1:printf("Upper case");
     break;
     case 2:printf("Lower Case");
     break;
     default:printf("Wrong input");
   }
 getch();
}

Copyright © 2013. BloggerSpice.com - All Rights Reserved
Customized by: MohammadFazle Rabbi | Powered by: BS
Designed by: Tilabs