NOTE: DO NOT delete nor change the code already given to you in the code template, except for the comments /* REPLACE THIS COMMENT WITH YOUR VARIABLES */ and /* REPLACE THIS COMMENT WITH YOUR CODE */. You will insert your solution by replacing these two comments. TASK 3: Write C++ code using the while statement to repeatedly read a sequence of characters from the user using the cin statement until the user enters a period (.) or exclamation mark (!). TASK 4: Write C++ code to count the number of vowels, consonants, and other characters. TASK 5: Write C++ code to display statistics using the counts computed in TASK 4. Be sure that there is a comment documenting each variable (see the document on Carmen under Modules on how to comment your code). Do not start a variable name with a capital letter. Be sure that your code is properly indented, readable, and use good descriptive names. Test your solution. #include using namespace std; int main() { char character; /* REPLACE THIS COMMENT WITH YOUR VARIABLES */ cout << "Enter text:" << endl; cin >> character; /* REPLACE THIS COMMENT WITH YOUR CODE */ return 0; }
NOTE: DO NOT delete nor change the code already given to you in the code template, except for the comments /* REPLACE THIS COMMENT WITH YOUR VARIABLES */ and /* REPLACE THIS COMMENT WITH YOUR CODE */. You will insert your solution by replacing these two comments.
TASK 3: Write C++ code using the while statement to repeatedly read a sequence of characters from the user using the cin statement until the user enters a period (.) or exclamation mark (!).
TASK 4: Write C++ code to count the number of vowels, consonants, and other characters.
TASK 5: Write C++ code to display statistics using the counts computed in TASK 4.
-
Be sure that there is a comment documenting each variable (see the document on Carmen under Modules on how to comment your code).
-
Do not start a variable name with a capital letter. Be sure that your code is properly indented, readable, and use good descriptive names.
-
Test your solution.
#include <iostream>
using namespace std;
int main()
{
char character;
/* REPLACE THIS COMMENT WITH YOUR VARIABLES */
cout << "Enter text:" << endl;
cin >> character;
/* REPLACE THIS COMMENT WITH YOUR CODE */
return 0;
}



Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 4 images









