Showing posts with label Decision control Structure. Show all posts
Showing posts with label Decision control Structure. Show all posts

Saturday, March 10, 2012

Program to check entered character is capital or small.

//Program to check entered character is capital or small.
#include<stdio.h>
#include<conio.h>
main()
{ int i;
char a;
printf("Enter a character capital or small-");
scanf("%c",&a);
i=a;
if(i>=65&&i<=90)
{printf("you entered capital letter");}
 if(i>=97&&i<=122)
printf("You entered small letter");
getch();
}