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, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
question
Computers and Technology, 24.06.2019 13:10
Write a program that has a conversation with the user. the program must ask for both strings and numbers as input. the program must ask for at least 4 different inputs from the user. the program must reuse at least 3 inputs in what it displays on the screen. the program must perform some form of arithmetic operation on the numbers the user inputs. turn in your .py file as well as a screenshot of your program's output. include comments in your code to explain how it works an example program run might look like (have fun with this and be creative): β€˜what is your name? ’ β€œjosh” β€˜, josh. what is your favorite color? ’ β€œgreen” β€˜mine too. do you also like ice cream? ’ β€œno” β€˜josh, how old are you? ’ β€œ40” β€˜ and how many siblings do you have? ’’ β€œ3” β€˜that means you are one of 4 kid(s). is green the favorite color of anyone else in your house? ’
Answers: 3
question
Computers and Technology, 24.06.2019 16:50
How many types of string types does python support?
Answers: 1
question
Computers and Technology, 24.06.2019 17:30
Click on the tab on the ribbon to open the backstage view. file view insert review
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
English, 13.11.2019 21:31
Questions on the website: 13722363