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
Write a script called fact.sh that is located in your workspace directory to calculate the factorial of a number n; where n is a
ira [324]

Answer:

hope this helps

Explanation:

7 0
3 years ago
Why did some people not like the arrival of machines?
Ahat [919]
People are concerned about losing their jobs. The industrial revolution introduced machines that removed the need for humans to be involved in highly repetitive tasks.
3 0
4 years ago
The identification of the technology management framework contain?
AlexFokin [52]

Answer:

Explanation:

The effective management of technology as a source of competitive advantage is of vital importance for many organizations. It is necessary to understand, communicate and integrate technology strategy with marketing, financial, operations and human resource strategies. This is of particular importance when one considers the increasing cost, pace and complexity of technology developments, combined with shortening product life cycles. A five process model provides a framework within which technology management activities can be understood: identification, selection, acquisition, exploitation and protection. Based on this model, a technology management assessment procedure has been developed, using an ``action research’’ approach. This paper presents an industrial case study describing the first full application of the procedure within a high-volume manufacturing business. The impact of applying the procedure is assessed in terms of benefits to the participating business, together with improvements to the assessment procedure itself, in the context of the action research framework. Keyword: Technology, Strategy, Management, Assessment

8 0
3 years ago
Suppose that you created an robot that was so advanced it could act independently in very complex situations. It made its own de
Mashutka [201]
It should not be capable of free action because there's no telling if it would be friendly for good remarks or mean for rude remarks
8 0
4 years ago
Which of the following dimensions of e-commerce technology involves the integration of video, audio, and text marketing messages
crimeas [40]

Answer:

Richness (Information Richness)

Explanation:

Information richness refers to the complexity of combining  video, audio and  make a marketing advert, the information generated is considered rich. other features or dimensions include; interactivity, information density, personalization etc

3 0
4 years ago
Other questions:
  • What is a packet?
    10·1 answer
  • If you want to copy a file from one folder to another , what would you do?
    15·1 answer
  • Public static Object[] question4(Student student1, Student student2)
    15·1 answer
  • Hey I don’t have a question I’m just testing something on this app
    6·2 answers
  • Which type of financial institution typically has membership requirements?
    9·2 answers
  • What is kerning in Adobe Indesign
    7·1 answer
  • int FindFirstCharFrom(char* str, char *sought); The function FindFirstCharFrom takes pointers to two C strings as arguments, str
    13·1 answer
  • Please help me please i’ll give brainli
    12·1 answer
  • A large retail company hires several new joiners and would like to incorporate Virtual Reality (VR) into their onboarding proces
    11·1 answer
  • Given the tables PRODUCT (ProductID. Description. Cost) SUPPLIER (Supplier D. ContactName, Phone Number) as shown in the figure
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!