Friday, 17 February 2012

check whether input alphabet is a vowel or not

#include<stdio.h>
 
main()
{
char ch;
 
printf("Enter a character\n");
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("%c is a vowel.\n", ch);
else
printf("%c is not a vowel.\n", ch);
 
return 0;
}

2 comments:

  1. nice!!!!!! go on buddy...........

    ReplyDelete
  2. Administrator::-

    thnx...enjoy the C Programming thts the moto behind this creation of blog

    ReplyDelete