Find a good cookbook. Read the instructions for your favourite dish. Write a program to display the recipe on the screen but with a difference. The quantity of each ingredient must be multiplied by a value entered from the keyboard.
For example, if the recipe needs 2 cups of flour the output displayed will be something like this
Please enter the factor to multiply the ingredients with : 4
Recipe name
Ingredients
// other ingredients
8 cups flour
Method
The program has the following structure:
 Declare an int variable named mFactor to store the value with which the quantity of each ingredient must be
multiplied.
 The program must make use of a cin statement to input a value from the keyboard and store it in mFactor

Solved
Show answers

Ask an AI advisor a question