Question: / / this program will allow the user to input from the keyboard whethered the last word to the following proverb shoul be party or
this program will allow the user to input from the keyboard whethered the last word to the following proverb shoul be party or country.
"Now is the time for all good men to come to the aid of their
Inputting a will use the word party. Any other number will use the word country.
PLACE YOUR NAME HERE.
#include
#include
using namespace std;
Fill in the prototype of the function writeProverb.
int main
int wordCode;
cout "Given the phrase:" endl;
cout "Now is the time for all good men to come to the aid of their
endl;
cout "Input a if you want the sentence to be finished with party"
endl;
cout "Input any other number for the word country" endl; cout "Please input your choice now" endl;
cin wordCode;
cout endl;
writeProverbwordCode;
return ;
void
task:
data in: data out:
writeProverb
This function prints a proverb. The function takes a number from the call. If that number is a it prints "Now is the time for all good men to come to the aid of their party." Otherwise, it prints "Now is the time for all good men
to come to the aid of their country."
code for ending word of proverb integer
no actual parameter altered
writeProverb int number
Fill in the body of the function to accomplish what is described above
Exercise : Some people know this proverb as Now is the time for all good men to come to the aid of their country while others heard it as Now is the time for all good men to come to the aid of their party. This program will allow the user to choose which way they want it printed. Fill in the blanks of the program to accomplish what is described in the program comments. What happens if you inadvertently enter a float such as
Exercise : Change the program so that an input of from the user will print party at the end, a will print country and any other number will be invalid so that the user will need to enter a new choice.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
