Program which takes a character as input and tells weather its a lower case or upper case and if it is a vowel
Write a program which takes a character as input and tells weather its a lower case or upper case and if it is a vowel?
#include
#include
void main(void)
{
while(1)
{
char ch;
clrscr();
char n; printf("Enter Character = ");
scanf("%c",&n);
if(n>64&&n<91)
{
printf("\n\n\nCharacter ( %c ) is UPPER CASE",n);
if(n==65||n==69||n==73||n==89||n==85)
printf("\nCharacter ( %c ) is WOVELS",n);
else
printf("\nCharacter ( %c ) is NOT WOVELS",n);
}
else if(n>95&&n<123)
{
printf("\n\n\nCharacter ( %c ) is LOWER CASE",n);
if(n==97||n==101||n==105||n==111||n==117)
printf("\nCharacter ( %c ) is WOVELS",n);
else
printf("\nCharacter ( %c ) is NOT WOVELS",n);
}
printf("\nDo you want to continue(Y/N)?");
ch=getch();
if(ch=='n')
break;
else
continue;
}
}
#include
#include
void main(void)
{
while(1)
{
char ch;
clrscr();
char n; printf("Enter Character = ");
scanf("%c",&n);
if(n>64&&n<91)
{
printf("\n\n\nCharacter ( %c ) is UPPER CASE",n);
if(n==65||n==69||n==73||n==89||n==85)
printf("\nCharacter ( %c ) is WOVELS",n);
else
printf("\nCharacter ( %c ) is NOT WOVELS",n);
}
else if(n>95&&n<123)
{
printf("\n\n\nCharacter ( %c ) is LOWER CASE",n);
if(n==97||n==101||n==105||n==111||n==117)
printf("\nCharacter ( %c ) is WOVELS",n);
else
printf("\nCharacter ( %c ) is NOT WOVELS",n);
}
printf("\nDo you want to continue(Y/N)?");
ch=getch();
if(ch=='n')
break;
else
continue;
}
}
Comments
Post a Comment