Computers and Technology

You plan to make a delicious meal and want to take the money you need to buy the ingredients. Fortunately you know in advance the price per pound of each ingredient as well as the exact amount you need. The program should read in the number of ingredients (up to a maximum of 10 ingredients), then for each ingredient the price per pound. Finally your program should read the weight necessary for the recipe (for each ingredient in the same order). Your program should calculate the total cost of these purchases, then display it with 6 decimal places. Example There are 4 ingredients and they all have a different price per pound: 9.90, 5.50, 12.0, and 15.0. You must take 0.25 lbs of the first, 1.5 lbs of the second, 0.3 lbs of the third and 1 lb of the fourth. It will cost exactly $29.325000.

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 22:00, savannahckatz
Business professionals of america, and future business leaders of america – phi beta lambda are both open to business students at which levels? check all that apply. elementary school middle school high school college
Answers: 1
image
Computers and Technology, 22.06.2019 06:30, messyquestions
Plz 40 points what are raster vectors? a bitmap image a vector file a type of printing press a small projector
Answers: 1
image
Computers and Technology, 22.06.2019 21:00, mazolethrin9632
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
image
Computers and Technology, 22.06.2019 22:50, youngboymark123
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
Do you know the correct answer?
You plan to make a delicious meal and want to take the money you need to buy the ingredients. Fortun...

Questions in other subjects: