Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(order_fruits.cpp) Write an algorithm and C++ program that prompts the user to enter three fruits and displays them in descending order. Here is a sample

image text in transcribed

(order_fruits.cpp) Write an algorithm and C++ program that prompts the user to enter three fruits and displays them in descending order. Here is a sample run: Enter the first fruit: Peach Enter the second fruit: Pear Enter the third fruit: Star Fruit The three fruits in alphabetical descending order are Star Fruit, Pear, Peach Hint: Transform the input names to capitalize the first letter of each string, and then compare them. If the words have more than 1 word, only the first letter of the first word needs to be capitalized. It will be a bit tricky to capitalize each word of the string (may need a for loop)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions