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
avanturin [10]
4 years ago
10

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 18 hours. Do not type your input into the optional input box below, rather, input in response to the prompts in the output terminal window (prompts are given to you in the program template). Use a string formatting expression with conversion specifiers to output the caffeine amount as floating-point numbers. Ex: If the input is 100, the output is: After 6 hours: 50.000000 mg After 12 hours: 25.000000 mg After 18 hours: 12.500000 mg
Computers and Technology
1 answer:
Ivan4 years ago
5 0

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

 // variable

float n;  

cout<<"Enter the initial value:";

//Read the input from the user  

cin>>n;

//Declare variables for storing values at 6, 12 and 18 hours

float hours_6, hours_12, hours_18;  

//Set precision level of floating point number

cout << fixed;

    cout << setprecision(6);

 //calculate values at 6, 12 and 18 hours

hours_6 = n / 2.0;

hours_12 = hours_6 / 2.0;

hours_18 = hours_12 / 2.0;

//display the output

cout<<"After 6 hours: "<<hours_6<<"mg"<<endl;

cout<<"After 12 hours: "<<hours_12<<"mg"<<endl;

cout<<"After 18 hours: "<<hours_18<<" mg"<<endl;

return 0;

}

Explanation:

Read an input from the user. Set the precision to 6 for displaying the result up to 6 decimal places. The first half life at 6 hours can be calculated by dividing the input by 2. The half life at 12 hours can be found out by dividing the half life value at 6 hours by 2. Similarly at 18 hours, we find the half life value by dividing the half life value at 12 hours by 2.

Output:

Enter the initial value:100                                                                                                

After 6 hours: 50.000000 mg                                                                                                

After 12 hours: 25.000000 mg                                                                                              

After 18 hours: 12.500000 mg  

You might be interested in
Discuss the advantages and disadvantages of using digital publishing over traditional forms of offset publishing.​
wolverine [178]

Answer:

advantages are that people don't appreciate us more on digital networks.

Explanation:

for example if we use digital networks for studying msn aged people love studying them with books or megazines in their hands.

8 0
3 years ago
Which methods are commonly used by sysadmins to organize issues?
prisoha [69]

Answer:

c. Service monitoring alerts

Explanation:

Given the fact that system administrators manage so many computer systems,  they are equipped with service monitoring alerts that indicate when there is a problem with any of the systems and the extent or magnanimity of the problem. This is necessary so as to attract responses from the right personnel.

Metrics are deployed to gather raw data on the system's use and behavior. Monitoring compiles these data to useful information that can be stored when they meet up to some standards. The alert system sends out signals to the administrators when some acceptable standards are not met. So, the service, monitoring alerts are used by system admins to organize issues.

3 0
3 years ago
When did outdoor air pollution first become a significant problem?
zmey [24]
Out door air pollution has been a problem since ancient Romans...but the industrial revouloution was when outdoor air pollution increased and it a significant problem...
hope this helps
6 0
3 years ago
Define the "Auto Number " Data Type in Access?
Anna007 [38]

Answer:

AutoNumber is a type of data used in Microsoft Access tables to generate an automatically incremented numeric counter. It may be used to create an identity column which uniquely identifies each record of a table. Only one AutoNumber is allowed in each table.

Explanation:

7 0
2 years ago
Use the Web as a resource to study the PDF format. a. Describe how PDF provides output that is consistent across different types
Deffense [45]

Answer:

Explanation:

PDF or (Portable Document Format) this is a format standard to store, design, administrate, this standard include bit maps format, image format, objects, and text format, all these formats to show pages quickly, PDF is a standard and for the devices can show this format, devices like prints, laptops, or even cellphones.

6 0
4 years ago
Other questions:
  • n the video, McWhorter says that “textspeak” might be a good thing for young people’s brains. Why does he think this?
    13·1 answer
  • Guidelines:
    6·1 answer
  • entry that has the address of 192.168.101.0 and the wildcard mask of 0.0.0.255. What is the range of IPv4 addresses that will be
    8·1 answer
  • In which way is a worm different from a virius
    12·1 answer
  • What are some of the other operations that might be implemented for a queue?
    14·1 answer
  • Which of the following sorting algorithms could be implemented on a doubly-linked list WITHOUT making the asymptotic worst-case
    12·1 answer
  • In C, developers may access arrays via bracketed syntax like Java or by using * dereferencing notation. The following assignment
    5·1 answer
  • What is the feature of ram for beginners
    5·2 answers
  • Which tool ia used to create the world wide web?
    15·1 answer
  • Rafter type and Truss type?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!