subject

Cookie Calories A bag of cookies holds 40 cookies. The calorie information on the bag claims that there are 10 servings in the bag and that a serving equals 300 calories. Write a program that lets the user enter the number of cookies he or she actually ate and then reports the number of total calories consumed.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 11:20
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is: censoredex: if userinput is "dang, that was scary! ", then output is: dang, that was scary! note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.#include #include using namespace std; int main() {string userinput; getline(cin, userinput); int ispresent = userinput.find("darn"); if (ispresent > 0){cout < < "censored" < < endl; /* your solution goes here */return 0; }
Answers: 3
question
Computers and Technology, 24.06.2019 17:40
The value of sin(x) (in radians) can be approximated by the alternating infinite series create a function (prob3_2) that takes inputs of a scalar angle measure (in radians) and the number of approximation terms, n, and estimates sin(x). do not use the sin function in your solution. you may use the factorial function. though this can be done without a loop (more efficiently), your program must use (at least) one. you may find the mod() function useful in solving the problem.
Answers: 1
question
Computers and Technology, 25.06.2019 02:30
On the pie chart below, which “slice” represents 30% of the budget?
Answers: 2
question
Computers and Technology, 25.06.2019 09:30
Is it possible to build a portal in real life?
Answers: 2
You know the right answer?
Cookie Calories A bag of cookies holds 40 cookies. The calorie information on the bag claims that th...
Questions
question
Physics, 01.05.2021 09:30
question
Mathematics, 01.05.2021 09:30
question
Arts, 01.05.2021 09:30
question
Mathematics, 01.05.2021 09:30
Questions on the website: 13722360