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

Examples of the skills used in science include _____ and ____
five times the height of a kakapo minus 70 equals the height of an emu
What is the area of sector GPH? Radius= 9 yards... 40 degrees
Which was the long-term effect of the building of the transcontinental railroad
If it took Brianna 4 hours to mow 20 lawns then at that rate how many hours does it take her to mow one lawn?
Which one is taller 5 7/24 or 5 5/16
Arrange in creasing order 14.20 414.200 14.240 14.210
Jenny’s needs to buy a computer to create word documents, make presentations, listen to music, and watch movies and videos. Which operating system would be appr
If canopy comes from a greek word that means "a curtain or a covering over a bed," what do you hink a canopy in a forest is?
My neighbor eventually became assistant editor for the monthly review, a literary journal. What's the appositive