Question: String Practice Problems Problem 2: Write a full program (starting from #include) that asks the user to type in 10 words, prompting the user for

String Practice Problems

Problem 2:

Write a full program (starting from #include) that asks the user to type in 10 words, prompting the user for each word with a number. The program then reports the longest word the user typed in. A sample output is shown below, with the user input shown in italic print.

Enter word #1: Gandalf Enter word #2: hobbit Enter word #3: Frodo Enter word #4: orc Enter word #5: antidisestablishmententarianism Enter word #6: Sauron

Enter word #7: ringEnter word #8: Sam Enter word #9: Legolas Enter word #10: Aragorn The longest word is antidisestablishmententarianism. To receive full credit, you must use a while loop. Do not write 10 cin statements.

Could you please be kind enough and answer in detail?

Thank you for ereading this and have a good one!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!