misc_pic
2009-10-28 17:26:16 UTC
the problem is i need to make a program where the user will key in 10 letters and then the program will count how many vowel with in the letter he/she key in. After counting how many vowels, the program should show the result if how many vowels, and also show the letters that he/she key in.
hey here's my program: please tell me which part is wrong and what code is lacking
#include
#include
char letters[10];
int main()
{
char letters;
int count;
printf("please enter at least 10 letters:");
scanf("%c",&letters);
if('a'=='a')
count++;
else if('A'=='A')
count++;
else if('e'=='e')
count++;
else if('E'=='E')
count++;
else if('i'=='i')
count++;
else if('I'=='I')
count++;
else if('o'=='o')
count++;
else if('O'=='O')
count++;
else if('u'=='u')
count++;
else if('U'=='U')
count++;
if(count>1)
printf("there are %d vowels", count);
else
printf("there are %d vowel", count);
getch();
return 0;
}