Prompt the user to specify the number of servings the


(1) Prompt the user for the number of cups of lemon juice, water, and sugar needed to make lemonade. Prompt the user to specify the number of servings the recipe yields. Output the ingredients and serving size.

Enter amount of lemon juice (in cups):
2
Enter amount of water (in cups):
16
Enter amount of agave nectar (in cups):
2.5
How many servings does this make?
6

Lemonade ingredients - yields 6.0 servings
2.0 cup(s) lemon juice
16.0 cup(s) water
2.5 cup(s) agave nectar

(2) Prompt the user to specify the desired number of servings. Adjust the amounts of each ingredient accordingly, and then output the ingredients and serving size. How many servings would you like to make?

48

Lemonade ingredients - yields 48.0 servings
16.0 cup(s) lemon juice
128.0 cup(s) water
20.0 cup(s) agave nectar

(3) Convert the ingredient measurements from (2) to gallons. Output the ingredients and serving size. Note: There are 16 cups in a gallon. 

Lemonade ingredients - yields 48.0 servings
1.0 gallon(s) lemon juice
8.0 gallon(s) water
1.25 gallon(s) agave nectar

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Prompt the user to specify the number of servings the
Reference No:- TGS02512026

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)