#include #include #include int main(int argc, char *argv[]) { int loop = 0; //Va
ID: 3656208 • Letter: #
Question
#include
#include
#include
int main(int argc, char *argv[])
{ int loop = 0; //Variable used for counting in the loop.
int keystrokes = 0; //Counts number of keystrokes.
int letters = 0; //Counts number of total letters.
int vowels = 0;//Counts number of vowels.
char sentence[9999]; //Defines the character array that will hold the input sentence. and fills it with the user's input.
printf("Sentence Analyzer. ");
printf("Input your sentence(s), then hit enter. ");
scanf(" %c", &sentence);
for(loop = 0; sentence[loop] != ' '; loop++) {
if (sentence[loop] = 'a'||'e'||'i'||'u')
{
++keystrokes;
++letters;
++vowels;
}
else
{
if (isalpha(sentence[loop]) == 1)
{
++keystrokes; ++letters;
}
else {
++keystrokes; } } }
printf("keystrokes%c ", keystrokes);
printf("Alpha Characters %c ", letters);
printf("Vowels %c", vowels);
return 0;
}