The file sweeps.cpp, is a program to print information about a sweepstake winner.
In the main function, change the call to Sweeps to include two more parameters, your first and last name, and change the city to be the city you are from.
Compile and run the program. The output should be the same as before, except with your name and city.
Compile and run the program.
string fname;
Then immediately before the first call to Sweeps, (using a cout statement) ask the user to type in their first name (must be one word). Read in their first name with a cin statement and store the value in the variable fname . Then send this value to the Sweeps function.
Compile and run your program. You will have to type in a name when it is run. The name must be one word (no blanks).
Modify the call to the Sweeps function to include these two new values entered by the user. Compile and run your program. The program should ask you to type in three words.
Note: You do not need to declare anymore variables for this part. Just reuse the same ones from last time (such as fname).
Compile and run your program. This time it should ask you for three words, print the resulting sweepstake output using that info, then ask you for three more words, and print the resulting sweepstake output using that info.
In this part we will make the sweeps program more modular.
announce(first, last); ticket(first); prize(prize, town);
![]()