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

Answers

Answer 1

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


Related Questions

For the function below, which variables have the same scope?

def square(numA, numB):

return numA ** numB

base = 5
power = 2
answer = square (base,power)
print(answer)


numA and power

power and base

numB and power

base and numA

Answers

Answer:

numB and power

Explanation:

Correct answer edge 2020

The variables have the same scope for the given function is power and base. The correct option is B.

What are variables?

A variable in mathematics is a symbol and placeholder for any mathematical object. A variable can specifically represent a number, a vector, a matrix, a function, a function's argument, a set, or an element of a set.

A variable in computer programming is an abstract storage location with an associated symbolic name that contains some known or unknown quantity of information referred to as a value; or, to put it another way, a variable is a named container for a specific set of bits or type of data.

Because power and base are declared in the same container, they have the same scope. Because they are not present in a function, their scope is said to be global.

Thus, the correct option is B.

For more details regarding variables, visit:

https://brainly.com/question/17344045

#SPJ2

jibran has made a presentation on save environment for a competition. his teacher suggested some changes.which view should be using following changes​

Answers

Answer:

Jibran has set up five slides in his new presentation and is ready to enter some text. He wants to focus on entering text without having to think about other PowerPoint elements such as graphics, pictures, sound, and animation. The best method for Jibran to enter text is by using which feature of Microsoft PowerPoint?

Sequential and direct access are two methods to locate data in memory. Discuss why major devices now a days use direct access? How can we convert data that is written on a device that supports only sequential access to a device that only support direct access method?

Answers

Answer:

Direct data access reduces the speed of retrieving data from memory or storage. Retrieving data and storing it in a cache memory provides direct access to data in the storage.

Explanation:

Sequential memory access, as the name implies, goes through the memory length location in search of the specified data. Direct memory access, provides a memory location index for direct retrieval of data.

Examples of direct and sequential memory access are RAM and tapes respectively. Data in sequential memory access can be access directly by getting data in advance and storing them in cache memory for direct access by the processor.

Write a function named getResults that accepts radius of a sphere and returns the volume and surface area. Call this function with radius = 3.5 , and display results in one decimal format.
volume = 4/3 * pi * r ^ 3
Surface Area = 4pi * r ^ 2​

Answers

Python

def getResults():

   radius = float(input())

   pi = 3.1415

   volume = 4/3 * pi * radius ** 3

   surfaceArea = 4*pi * radius ** 2.0

   print (volume)

   print (surfaceArea)

getResults()

C#:

       public static void Main(string[] args)

       {

           getResults(Convert.ToDouble(Console.ReadLine()));  

       }

       public static double[] getResults(double radius)

       {

           double radiusObj = radius;

           double volume = 1.33333333333 * Math.PI * Math.Pow(radiusObj, 3);

           double surfaceArea = 4 * Math.PI * Math.Pow(radiusObj, 2) ;

           double[] surfaceAndVolume = { volume, surfaceArea };

           Console.WriteLine(volume.ToString());

           Console.WriteLine(surfaceArea.ToString());

           return surfaceAndVolume;

       }

Java:

public static void main(String[] args)

   {

       Scanner  scanner = new Scanner(System.in);

       getResults(scanner.nextDouble());

   }

   public static double[] getResults(double radius)

   {

       double radiusObj = radius;

       double volume = 1.33333333333 * Math.PI * Math.pow(radiusObj, 3);

       double surfaceArea = 4 * Math.PI * Math.pow(radiusObj, 2) ;

       double[] surfaceAndVolume = { volume, surfaceArea };

       System.out.println(volume);

       System.out.println(surfaceArea);

       return surfaceAndVolume;

   }

3. You have set up your Android phone using one Google account and your Android tablet using a second Google account. Now you would like to download the apps you purchased on your phone to your tablet. What is the best way to do this?
a. Set up the Google account on your tablet that you used to buy apps on your phone and then download the apps.
b. Buy the apps a second time from your tablet.
c. Back up the apps on your phone to your SD card and then move the SD card to your tablet and transfer the apps.
d. Call Google support and ask them to merge the two Google accounts into one.

Answers

Answer:

a. Set up the Google account on your tablet that you used to buy apps on your phone and then download the apps.

Explanation:

the formula to calculate percentage is the same as which other functions

Answers

Answer:

Division

Explanatio

Answer: everyone’s saying division, so I’m guessing the correct answer is division

Explanation: hope y’all have a blessed day

What is the minimum size of a data type, in bytes, to be impacted by system endianness. (Whole numbers only)?

Answers

Answer:

30

Explanation:

A data type must be at least 2 bytes in size to be affected by the endianness system.

What is endianness system?

Endianness in computing refers to the arrangement of bytes inside a word of digital data stored in a computer's memory.

Big-endian or little-endian are the two main ways that endianness is stated.

The least significant byte in a word is kept at the largest memory location and the most significant byte is kept at the smallest address in a big-endian system.

The term "endianness" refers to the arrangement of bytes as they are stored in computer memory. Endianness is classified as big or little depending on which value is stored first.

Thus, for the endianness system to apply, a data type must be at least 2 bytes in size.

For more details regarding endianness system, visit:

https://brainly.com/question/14488920

#SPJ6

what are the advantages of using a folder?​

Answers

Answer:

1. easy access to files

2. better organization

Explanation:

do you think your future career will continue to become more and more reliant on computers and is it a good thing to depend so fully on computers to help with work skills and careers​

Answers

There are good and bad, some people rely on computers, and some people need him to help them find information.

I personally think many future careers will continue to become more reliant on computers, however maybe not every single one.

I wouldn’t say it’s a good thing to depend so fully on computers but I also wouldn’t say it’s a bad thing either.

You probably shouldn’t rely on a computer 100% because it’s essentially important to know how things work on your own rather than depending on a computer all the time. While it can be a good thing. Like cashiers can print out a receipt rather than writing it out and consuming more time.

1) ¡(X && Y )&& !X || W && Z

2) W || !(X || Z && Y)

3) !X || !Y || Z && X && !Y

4) X || Y || X && !Z && !Y

Answers

Answer:

???

Explanation:

Answer:

uhh

Explanation:

you spammed random stuff?

Write a program that computes the minimum, maximum, average, median and standard deviation of the population over time for a borough (entered by the user). Your program should assume that the NYC historical population data file, nycHistPop.csv is in the same directory.

Answers

Answer:

import pandas as pd

df = pd.read_csv('nycHistPop_csv', skiprows=5)

NY_region = list(df.columns[1: -1])

select_region = input("Enter region: ")_capitalize()

if select_region in NY_region:

   pass

else:

   raise("Region must be in New york")

def pop(location):

   # or used describe() to replace all like: print(df[location]_describe())

   print(df[location]_min())

   print(df[location]_max())

   print(df[location]_mean())

   print(df[location]_median())

   print(df[location]_td())

pop(select_region)

Explanation:

Pandas is a python packet that combines the power of numpy and matplotlib used for data manipulation. It is good for working with tables that are converted to dataframes.

The nycHistPop_csv file is read to the code to a dataframe called "df", then the user input and the function "pop" is used to automatically generate the statistics of a given region.

Which of these are steps in the testing cycle? Check all of the boxes that apply.

testing the fixed code

releasing debugging version

fixing the error

reproducing and diagnosing the error

Answers

Answer:

A,C and D

Explanation: You're welcome

Answer:

A and D

Explanation:

Originally, Java was used to create similar apps as what other language?
Perl
Python
CSS
Javascript

Answers

Answer:

Python

Explanation:

Took the test

Originally, Java was used to create similar apps as other languages, which as python. The correct option is b.

What are computer languages?

The computer languages are Java and Python is in their conversion; the Java compiler converts Java source code into an intermediate code known as bytecode, whereas the Python interpreter converts Python source code into machine code line by line.

Curly braces are used in Java to define the beginning and end of each function and class definition, whereas indentation is used in Python to separate code into separate blocks.

Multiple inheritances is done partially through interfaces in Java, whereas Python continues to support both solitary and multiple inheritances.

Therefore, the correct option is b. Python.

To learn more about computer languages, refer to the below link:

https://brainly.com/question/14523217

#SPJ2

What is the advantage of using a translation look-aside buffer (TLB), also called associative memory, in the logical-physical address mapping process? Explain how the logical-physical address mapping logic works using an inverted page table. When does the MMU detect page-fault? Explain four of the main steps for resolving page faults.

Answers

Answer:

A) The advantage of using TLB is that it is used for storing the recent transactions of the virtual memory to the physical memory and this is used for the sole purpose of fast retrieval of data

B) When using an inverted table the logical-physical address mapping logic works as a hashing function by  connecting pieces of the hardware of logical address and getting them translated to the physical address. this hash function in turn generates the index to the frame table

C) The MMU detect page-fault when there is an exception been raised by the computer when a program is ran to access a memory page and this program is not mapped out by the MMU in the process

The four steps are :

The first step is to check on the memory address requested to make sure of  a  valid memory request.

 The second step is to setup A free frame  and a disk operation that is scheduled for getting the necessary page from the disk.

As the the I/O is been completed the processor table is been updated

Finally the   Instruction will get restarted from the beginning indicating what might have been caused by a page fault.

Explanation:

A) The advantage of using TLB is that it is used for storing the recent transactions of the virtual memory to the physical memory and this is used for the sole purpose of fast retrieval of data

B) When using an inverted table the logical-physical address mapping logic works as a hashing function by  connecting pieces of the hardware of logical address and getting them translated to the physical address. this hash function in turn generates the index to the frame table

C) The MMU detect page-fault when there is an exception been raised by the computer when a program is ran to access a memory page and this program is not mapped out by the MMU in the process

The four steps are :

The first step is to check on the memory address requested to make sure of  a  valid memory request.

 The second step is to setup A free frame  and a disk operation that is scheduled for getting the necessary page from the disk.

As the the I/O is been completed the processor table is been updated

Finally the   Instruction will get restarted from the beginning indicating what might have been caused by a page fault.

When a called function completes its task, it normally:_________a. logs its results b. terminates program execution normally c. aborts program execution d. returns to the calling function

Answers

Answer:

sorry this is tought

Explanation:

no idea

Why is content knowledge as important as generalized critical thinking for Web Analytics and Web Intelligence reporting and insights? A) Because it's very difficult for students to apply critical thinking skills learned in one subject to another, even between different fields of science. B) It is said that content is king and that having up to date content knowledge of Web Analytics is crucial in order to be an effective Analyst C) Everything is changing so fast that you need to keep up to date with the changes in the platforms that you use or are considering using for personal or organizational deployment. D) Content knowledge of Web Analytics is important because in a field like emerging technology that Web Analytics is still considered to be, new features of a Web Analytics platform can have a major impact on the ability to do the project and deliver value from it.

Answers

Answer:

B) It is said that content is king and that having up to date content knowledge of Web Analytics is crucial in order to be an effective Analyst

Explanation:

The answer is option B. A good knowledge of content is very important and crucial due to the fact that knowledge stands at the center or the most important thing in the business sector.

Web analytics is a method of measuring, analysing and reporting web usage data. Content knowledge is a good understanding of the subject area. To understand web analytics, a going knowledge of the facts, theories and concepts are important if one wants to be an effective analyst.

Therefore b is the answer to this question.

Consider this function comment. Which of the following options is recommended in your textbook? Computes the area of a cuboid. eparaml width the width of the cuboid eparam2 height the height of the cuboid eparam3 length the length of the cuboid ereturn the area of the cuboid double area(double width, double height, double length) double result - width +height 1ength; return result: A. The comments are adequate to describe the function. B. The lines need to end with semicolons like other C++ statements. C. The parameters should be described more completely. D. The eparaml, eparam2, eparam3 should be just eparam.

Answers

Answer:

A. The comments are adequate to describe the function.

Explanation:

C++ programming language comments starts with two forward-slash ("//") and can be written above a code statement or at the right-hand side of the code statements

The comments of the area() function with three parameters width, height, and length are adequate to describe the function as it does not need to end with a semi-colon.

Is this right? I’m not sure

Answers

Yeah indeed it is. Good job!!

Which of the following online activities seem appropriate for the workplace? (select all that apply) A.watching a webinar to learn new job skills
B.watching TV online
C. seeking donations to support your election to the Senate
D. reading press releases from your company's competitors
E. sharing career advice with your peers
F. sharing company secrets in a public forum​

Answers

Answer:

A, D, and E

watching a webinar to learn new job skills

reading press releases from your company’s competitors

sharing career advice with your peers

Explanation:

got it right on edge2020

The online activities that seem appropriate for the workplace  is sharing career advice with your peers.

What are virtual activities?

The virtual activities are known to be any kind of online activities that is often done by people to make sure they have good and continued collaboration with other people.

Conclusively, Note that the use of online activities in the workplace should be the one that will help you and your peers to grow such as  sharing career advice with your peers.

Learn more about  online activities  from

https://brainly.com/question/13171394

what is the advantages of your solutions ​

Answers

Answer:

One of the key benefits of using IT solutions is that they provide the opportunity to use the latest technology in the market. This is because the IT solution always offers the best equipment and technologies in the market, and also, they are upgraded at zero additional costs.

Explanation:

what is the norm that psychoanalysis of Freud deviates?

Answers

Answer:

Freud deviates from the norm of current mainstream psychology which has more or less lost its way - if it ever had one - under the influence of the same pressures which produce our dysfunctional politics and our troubled societies at large (technological change, globalisation, and so on).

Explanation:

Creds to Quora

Does anyone have any Edge(nuity) tips? Like how to skip videos and such.

Answers

Answer:

yes

Explanation:

it is quite easy chat me up and i will give u the link

2. Suppose you and your friend want to exchange lecture notes taken during class. She has an iPhone and you have an iPad. What is the easiest way to do the exchange?
a. Cope the files to an SD card and move the SD card to each device.
b. Drop the files in OneDrive and share notebooks with each other.
c. Send a text to each other with the files attached.
d. Transfer the files through an AirDrop connection.

Answers

Answer:

d. Transfer the files through an AirDrop connection.

Explanation:

I feel like im not sure 100%

But i hope it helps!

HAPPY THXGIVING!

Explain
the three types of periodic
maintanance. .​

Answers

Answer:

poop i think

Explanation:

solve the system of equations and choose the correct ordered pair.

4x+5y=22
2x+3y = 12

Answers

Answer:

(3,2) x = 3, y = 2

Explanation:

Pleases Help ME An example of a _________________ impact is when a product is back ordered and the business contacts the customer via email to let them know of the new ship date.


A)Negative



B)Positive

Answers

Answer:

positive

Explanation:

it shows good customer service

kali linux os and window os who is the best​

Answers

Answer:

Windows

Explanation:

It is down to preference. I prefer windows due to its large compatibility with a wide range of apps.

Answer:

It is only what you prefer

Explanation:

im doing programming with kali and i have no problems. although windows is more user friendly and what people use on a day to day, kali is for pentsters mostly.

PLEASE I NEED HELP NOW!!!!!


Frank types in many numbers to calculate baseball statistics. To enter these numbers, he should use the _____.

Answers

Answer:

Numeric keypad

Explanation:

The numeric keypad has mostly only numbers so it would be more convenient for him.

Hope this helps!

Answer:

Numeric keypad on the right side of the keyboard.

Explanation:

Ap*x

PLZ HELP!!!!!!!!! XC

what dose it mean if a circuit is hot to the touch

Answers

Answer:

The circuit is carrying more than it is supposed to and is overheating.

The series is overloaded

Sptr is a pointer pointing to the beginning of an array called sarray. To access the value in sarray[3] by using the pointer, you would use:a) *sptr[*3] b) *sptr+3 c) sptr +3 d) *(sptr + 3)

Answers

Answer:

The correct option for accessing the value in sarray[3] is : d) *(sptr+3)

Explanation:

a) *sptr[*3]  is wrong option because its syntax is not right it will give errors.

b) *sptr+3 is also wrong option because it will add 3 to the value of sarray[0].

c) sptr+3 is wrong option because it will only access the address of sarray[3] not the value it contains.

d) *(sptr +3) is correct syntax for accessing value in sarray[3] by using pointer

Other Questions
Which choice correctly states King's purpose for writing this letter? To open a civil rights office there to launch a nonviolent protest To explain why he came to Birmingham To support his fellow civil rights activists What was a Legalist policy under Emperor Win Shihuangdi?A. Closing farmsB. Burning booksC. Removing statuesD. Destroying villages What is the answer to this? I think its the one I selected but I want to verify n = 2, a = 16"Find the indicated real nth root(s) of a. How does Shakespeare present Chaos and Disorder in Macbeth? compare and contrast Edgar Alan Poe Tell Tale Heart and The Sleeper. what is meant by people as resource Resource use can also help determineenvironmentidentity and cultureperceptionethnicity The structure of PF3(C6H5)2 is trigonal bipyramidal, with one equatorial and two axial F atoms which interchange positions when heated. Describe the low- and high- temperature 31P and 19F NMR spectra. Tell me ten different things a person would need a credit score for? WILL MARK BRAINLIEST DUE TODAY PLEASE HELP 50 POINTS answer choices are A:45B:180C:61D:119 What is your proudest accomplishment? Im just curious. Consider the estimated equation from your textbook: Test Score = 698.9 - 2.28 times STR, R^2 = 0.051, SER = 18.6 (10.4) (0.52) The t-statistic for the slope is approximately: a) 67.20. b) 4.38. c) 1.76. d) 0.52. Dan made $5.38 for a half hour of work. At Dan's current rate of pay, how much would Dan make for 8 hours of work?WILL RECIEVE ANYTHING YOU WOULD LIKE Noah bought x apples, and Elena bought 1/4 moreapples. Write an expression for the number of applesElena bought. Which ideas correctly describe Louisianas first state constitution? Check all that apply.It was modeled after the state constitution of Virginia.It included laws based on Frances Napoleonic Code.It was written entirely in French instead of English.It mostly featured key ideas from English common law.It served to secure rights for the citizens of Louisiana. Tubular centrifuge is used for recovering cells 60% of the cells or recover data flow rate of 12 l/min with a rotational speed of 4000 RPM what is the RPM to increase the recovery rate of the cells to 95% at the same flow rate Write a statement that describes the relationship between a countrys investment in capital goods and its GDP Which statement correctly describes the location of the incenter of a triangle?Question 15 options:A) The incenter is equidistant from all three vertices of the triangle.B) The incenter is equidistant from all three sides of the triangle.C) The incenter is closest to the shortest side of the triangle.D) The incenter is closest to the longest side of the triangle. How would you describe a dwarf planet?It is too big to be a planet, but too small to be an asteroid, meteor, or other space object.It is too small to be a planet, and too small to be an asteroid, meteor, or other space object.It is too small to be a planet, but too big to be an asteroid, meteor, or other space object.It is too big to be a planet, and too big to be an asteroid, meteor, or other space object.