Monday, November 15, 2010

Write a program to read an alphanumeric from user and check whether entered alphanumeric is (1) Capital Alphabet (2) Small Alphabet (3) Number

/* Write a program to read an alphanumeric from user and check whether entered alphanumeric is (1) Capital Alphabet (2) Small Alphabet (3) Number
   Developed by : Malhar Vora
   Developed on : 15-11-2010
   Development Status : Completed and tested
   Email : vbmade2000@gmail.com
   WebSite : www.malhar2010.blogspot.com
**************************************************************************/
void main()
{

 char c;
 printf("Enter any alphanumeric character :");
 scanf("%c",&c);

 if(c>=48 && c<=57)
 {
        printf("Number");
        return;
 }
 else if(c>=65 && c<=91)
 {
        printf("Capital alphabet");
        return;
 }
 else if(c>=97 && c<=123)
 {
        printf("Small Alphabet");
        return;
 }
 else
 {
        printf("Unknown symbol");
        return;
 }

}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.