subject

A drink costs 2 dollars. A taco costs 5 dollars. Given the number of each, compute total cost and assign to totalCost. Ex: 2 drinks and 3 tacos yields totalCost of 19. int drinkCount = 4, tacoCount = 6;
// std::cin>>drinks >> tacos; // you may read values from input stream
int drinkCost = 2, tacoCost = 4;
int totalCost = drinkCount * drinkCost + tacoCount * tacoCost ;
// std::cout << totalCost; // you may want print total cost

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 1
question
Computers and Technology, 23.06.2019 02:50
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
You know the right answer?
A drink costs 2 dollars. A taco costs 5 dollars. Given the number of each, compute total cost and as...
Questions
question
Mathematics, 03.10.2019 03:30
question
Biology, 03.10.2019 03:30
question
Computers and Technology, 03.10.2019 03:30