Hi, I have created a program counting vowels in a string
Vowels (A, E, I, O, U, a, e, i, o, u).
I don't know how to get it to show something like this:
Input: This is a string.
Output: The number of Vowels is: 4
Any help would be greatly appreciated.Code:#include <stdio.h> #define SIZE 50 int main (void) { int va = 0; /*Vowel counters*/ int ve = 0; int vi = 0; int vo = 0; int vu = 0; char c; /*Character input to be placed into array*/ char s[SIZE]; /*Character Array*/ int i=0; puts("Enter a Line of Text:"); while ((c = getchar()) != '\n'){ s[i++] = c; } puts ("\n"); puts(s); printf("\n"); printf("%d", a); printf("\n"); return 0; }



LinkBack URL
About LinkBacks



