subject
Computers and Technology, 10.06.2021 19:40 hinsri

A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 24 hours. Output each floating-point value with two digits after the decimal point, which can be achieved by executing
cout << fixed << setprecision(2); once before all other cout statements.

Ex: If the input is:

100
the output is:

After 6 hours: 50.00 mg
After 12 hours: 25.00 mg
After 24 hours: 6.25 mg
Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer) has between 100 mg and 200 mg.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 08:00, Buddy01
Match the items with their respective descriptions.
Answers: 1
image
Computers and Technology, 24.06.2019 13:50, Estefaniamarilicolin
What does code do? a creates a text box that says "solid black" b creates a black border of any width c creates a black border 1 pixel wide
Answers: 1
image
Computers and Technology, 24.06.2019 23:30, ninja12302
Does anyone have the problem where you try to watch a video to get your answer but it brings up a thing asking your gender to make ads relevant but it doesn't load? btw i won't be able to see the answer so use the comments .
Answers: 1
image
Computers and Technology, 25.06.2019 06:00, DASASDAEDWEDA
Sam needs to create a spreadsheet for his coworkers. they will need to follow a crossed a long road of data. sam would like to make his spreadsheet easy to read. sam should
Answers: 1
You know the right answer?
A half-life is the amount of time it takes for a substance or entity to fall to half its original va...

Questions in other subjects:

Konu
Computers and Technology, 09.11.2020 21:50
Konu
History, 09.11.2020 21:50