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]
3 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:
Ivan3 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
Network is a process by which several protocols evolve to form a single product.
astraxan [27]

Answer:

Is this like a true or false thing or just a statement?

6 0
3 years ago
The elements of an integer-valued array can be set to 0 (i.e., the array can be cleared) recursively as follows: An array of siz
marta [7]

Answer:.......

void clear(int *array, int length){

 

  if (length == 0)return;  

 

  array[0] = 0;  

 

  clear(array + 1, length-1);

}

Explanation:

The void function accepts an integer array.

7 0
4 years ago
What are the correct answers to the following questions?
Lena [83]

Answer:

1. analog sound

2. digital sound

3. pixels

4.  local area network

5.bus

6. slots

Explanation:

4 0
2 years ago
persisting clumps of clippings can cause the turf below to yellow and possibly die. this phonomenon is called _________________
SOVA2 [1]

The turf below may turn yellow and even die as a result of persistent clumps of clippings. The silo effect is the name given to this phenomenon.

<h3>What is the business silo effect?</h3>

The term "silo effect," which is used frequently in the business and organizational communities to describe a lack of communication and shared objectives between departments in an organization, is used to describe this situation. Employee groups that typically operate independently within an organization are referred to as silos.

<h3>Silo mentality definition?</h3>

A silo mentality occurs when different teams or team members within the same organization purposefully withhold important information from other employees. This silo mentality undermines a company's unified vision and prevents long-term objectives from being reached.

To know more about clumps of clippings visit:-

brainly.com/question/29454362

#SPJ4

5 0
1 year ago
hackers can use as part of a reconnaissance process to learn about active network addresses and active processes?
aalyn [17]

Answer:

ICMP.

Explanation:

Hackers might use ICMP for gain knowledge about current system addresses and specific procedures as part of a reconnaissance process.

ICMP is a failure informing system used by network protocols such as routers to produce warning to that of the source Address while network issues interrupt IP packet transmission.

3 0
3 years ago
Other questions:
  • Explain three applications of data mining
    14·1 answer
  • What is Napoleon's friend's full name? From the Napoleon Dynamite movie.
    9·2 answers
  • Consider relations A and B. Relation A represents the entity on the ""one side"" of a one-to-many relationship; Relation B repre
    11·1 answer
  • __________________ ensures that each row is uniquely identified by the primary key, which means that a proper search for an exis
    10·1 answer
  • What tasks do most operating systems perform?
    15·1 answer
  • Which file type is typically used for videos? GIF MPEG MP3 PDF
    8·1 answer
  • Assume there is a variable , h already associated with a positive integer value. Write the code necessary to count the number of
    13·1 answer
  • Random access memory is the portion of a computer's primary storage that does not lose its contents when one switches off the po
    6·2 answers
  • Cloud computing allows organizations to rent computing resources from providers instead of having their own locally managed ____
    7·1 answer
  • 13./ Write a java program to input an integer N and compute its factorial. Print the number and the factorial.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!