pacmanofftop1857 pacmanofftop1857
  • 25-11-2020
  • Computers and Technology
contestada

write a C++ program that ask the user for the number of cookies eaten and display the calorie consumption

Respuesta :

migueljnm940 migueljnm940
  • 26-11-2020

Answer:

#include <iostream>

using namespace std;

int main()

{

   int cookies;

   cin >> cookies;

   cout << "The calorie consumption is: " << cookies * 142 << endl;

   return 0;

}

Explanation:

First line: include basic library of C++(input and output).

using namespace std;

Says to compiler we are using std.

int main() Main function

int cookies, cookies variable, of int type

cin >> cookies

get the number of the cookies from user

cout Print the text and calories(one cookie have 142 calories)

Have a nice day ;)

Answer Link

Otras preguntas

if a driver who is underthe age of 21 isstopped by a law enforcement officer and is shown to have a BAL of .02% he / she will have his r her drivingprivlages s
Compared with the peak wavelength given off by the sun, what is the peak wavelength given off by a hotter star? A.) shorter in wavelength and higher in energy B
What is an example of a solution?
The process of incorporation has resulted in the __________ of federal power.
How does law hold diverse people of different backgrounds into large, organized groups?
Identify the number that does not belong with the other three. Explain your reasoning.
What is the greatest common factor of 24 ,36, and 64
2t-10=4;3 solution or not
Jerry gave (Jerry's) _____ copy of The Making of Americans to Alberto. he him his
A _______ is smaller than a notebook or laptop and has a touchscreen and sometimes a pointing device.