Search This Blog

Wednesday, July 27, 2011

vowel or constant


#include<stdio.h>
#include<conio.h>
#include<iostream>


using namespace std;
int main(void)
{
   /* declarations */
 char ch;
 
   printf ("Enter one alphabet : ");
   scanf ("%c", &ch);
   printf ("Alphabet entered: %c\n", ch );
 
   if(ch=='a'||ch=='A'||ch=='e'||ch=='E'||ch=='i'||ch=='I'||ch=='o'||ch=='O'||ch=='u'||ch=='U')
printf("it is a vowel \n");
 else
 
printf("it is a constant \n");

getch();

return (0);
}

No comments:

Post a Comment