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
svp [43]
3 years ago
6

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-lif

e 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.
Computers and Technology
1 answer:
Leokris [45]3 years ago
3 0

Answer:

#include <iostream>

#include<iomanip>

using namespace std;

int main()

{

double caffeineMg;

cin>>caffeineMg;

cout<<"After 6 hours: "<<fixed<<setprecision(2)<<caffeineMg/2.0<<" mg\n";

cout<<"After 12 hours: "<<fixed<<setprecision(2)<<caffeineMg/4.0<<" mg\n";

cout<<"After 24 hours: "<<fixed<<setprecision(2)<<caffeineMg/8.0<<" mg\n";

 

return 0;

}

Explanation:

  • Take the caffeine as input from user.
  • Calculate by dividing this value with relevant half life.
  • Use setprecision(2) to display 2 digits after decimal point.
You might be interested in
Select the correct answer. Arcade games such as Donkey Kong, Mr. Do! , and Venture were adapted from arcade titles to home conso
Andrew [12]

Answer:

D. Magnavox

hgjvyihbnjbuhklnk. hvgvjnm;lkbhkvkbl.

4 0
4 years ago
. Which one of the following is not a typical engine cylinder arrangement? A. V-type B. Dome-type C. In-line D. Horizontally opp
Tomtit [17]
The answer would be B. Dome-Type. V-Type engines are some of the most common, with abbreviations such as V6, V8, etc. In-Line engines are where the cylinders are in a straight line. Horizontally opposed engines or 'flat' engines are where the cylinders are on a flat plane. Therefore the only type of engine *configuration* is B. Dome-Type.

Dome-type relates to the cylinder design, where the piston has a convex dome to maximize the efficiency.

Hope this helps.
4 0
3 years ago
Alice's public key, and sends back the number R encrypted with his private key. Alice decrypts the message and verifies that the
Agata [3.3K]

There are different kinds of keys. The identities of Alice and Bob are verified in this protocol.

<h3>What is public and private key in SSL?</h3>

These keys are known to be a kind of related pair of text files and they are often made together as a pair if one makes their Certificate Signing Request (CSR).

Note that the private key is different file that is often used in the encryption/decryption of data so as to sent a file between one's server and the connecting clients.

Learn more about  public/private key from

brainly.com/question/8782374

3 0
2 years ago
How is line used to convey meaning and emotion within the frame below? Can you identify the primary direction of lines that dire
OleMash [197]
There is no frame below. this needs an image.  Usually line show movement or direction
8 0
4 years ago
PLEASE HELP ITS DRIVERS ED
sasho [114]
I will have to say the answer is.d
3 0
4 years ago
Read 2 more answers
Other questions:
  • In which type of land contract does the seller earn interest on the difference between what the seller owes on an existing loan
    14·1 answer
  • What does festive mean
    11·2 answers
  • Which button should be utilized if a user is unsure whether or not they are the right person to reply to an email?
    6·2 answers
  • Guys for those who are familiar to bubble gum sim...THERE IS A HUGE EVENT AND I DONT WANT TO FAIL AN EVENT...(again) is anyone w
    9·1 answer
  • Create flowchart using Flowgorithm to represent the logic where the user inputs a number between 1 and 3 and displays the number
    7·1 answer
  • What is the purpose of the ISOWEEKNUM function
    13·2 answers
  • Complete the function to return the factorial of the parameter,
    9·2 answers
  • A Task can be created in Outlook 2016 by clicking on the Tasks navigation item, or by
    5·2 answers
  • Define a function OutputValues() that takes two integer parameters and outputs all integers between the first and the second par
    15·1 answer
  • Tim is a project manager. He is brainstorming with his team about problems that could arise during the next phase of the project
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!