#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char ch;
printf("Enter an alphabet : ");
scanf("%c",&ch);
if(ch=='a' || ch=='A' || ch=='e' || ch=='E' ||
ch=='i' || ch=='I' || ch=='o' || ch=='O' ||
ch=='u' || ch=='U')
{
printf("\n This is a vowel");
}
else
{
printf("\n This is not a vowel");
}
getch();
}
Run1:
Run 2:
Previous Next
#include<conio.h>
void main()
{
clrscr();
char ch;
printf("Enter an alphabet : ");
scanf("%c",&ch);
if(ch=='a' || ch=='A' || ch=='e' || ch=='E' ||
ch=='i' || ch=='I' || ch=='o' || ch=='O' ||
ch=='u' || ch=='U')
{
printf("\n This is a vowel");
}
else
{
printf("\n This is not a vowel");
}
getch();
}
Run1:
Run 2:
Previous Next
No comments:
Post a Comment