1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Xelga [282]
3 years ago
9

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

Computers and Technology
1 answer:
Artyom0805 [142]3 years ago
4 0

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 ;)

You might be interested in
The Table Design and Layout tabs are available under the
maria [59]

Answer:

A-Table Tools

Explanation:

Layout tab. The Layout tab includes a selection tool for cells, rows, columns, and the entire table; tools to delete or insert rows and columns; tools

7 0
3 years ago
Read 2 more answers
Heres a survey
vodka [1.7K]

food.

I'm a child of God snatching lost souls out of Hell

bake

I go to church

some is to much information to give thx and have a blessed day

4 0
3 years ago
Read 2 more answers
An information system report is an example of...
STatiana [176]

Answer:

a. data processing

b. data collection

c. data input

d. data output

Explanation:

An information system is a system used to filter, process, collect, distribute and create data.

Information system can be a work system whereby humans and machine perform processess using informations gathered, process it to solve the needs of their customers in the form of goods and services.

8 0
4 years ago
How to get the blade out of a pencil sharpener?
agasfer [191]
Poke hole with thin but strong object
Or buy new sharpener
7 0
4 years ago
Write a program that prompts the user to enter a month (1-12) and year, then displays the number of days in the month. For examp
uysha [10]

Answer:

In Java

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

    int mnth, yr;

 Scanner input = new Scanner(System.in);

 System.out.print("Month: ");  mnth = input.nextInt();

 System.out.print("Year: ");  yr = input.nextInt();

 boolean lpYear = (yr % 4 == 0 && yr % 100 != 0) || (yr % 400 == 0);

 if(mnth == 1 || mnth == 3 || mnth == 5 || mnth== 7 || mnth == 8 || mnth == 10 || mnth == 12){

     System.out.print("31 days");  }

 else if(mnth == 2){

     System.out.print(((lpYear) ? "29 days" : "28 days"));  }

else if(mnth == 9 || mnth == 6 || mnth == 4 || mnth== 11){

     System.out.print("30 days");  }

 else{      System.out.print("Invalid");  }

}

}

Explanation:

See attachment for complete program where comments were used as explanation.

Download txt
3 0
3 years ago
Other questions:
  • TCP waits until it has received three duplicate ACKs before performing a fast retransmit. Why do you think the TCP designers cho
    13·1 answer
  • In molecular biology the "alphabet" of genes consists of four chemicals (called nucleotides) represented by the letters A C G T.
    12·2 answers
  • Which of these components is a part of the central processing unit (cpu) of a computer??
    14·1 answer
  • How did AI help in creating the Cognitive dress for Marchesa?
    5·1 answer
  • The intensity of force acting on a rock body is expressed as
    14·1 answer
  • Inthe old days, databases did NOT support ____________.
    10·1 answer
  • Processor speed is a measurement of what?
    10·1 answer
  • Killer app is BEST described as:
    5·1 answer
  • A clock is reading 10:27:54.0 (hr:min:sec) when it is discovered to be 4 seconds fast. Explain why it is undesirable to set it b
    9·1 answer
  • In this lab, your task is to complete the following: Enable all of the necessary ports on each networking device that will allow
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!