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
Plz tell the answer I I'll mark u as the brainliest
Zina [86]

Answer:

oo 89 po yyuyuyoioo9ii5645487)89)89)89)89)80(98(98(98(87)()

Explanation:

okkkkkk

6 0
3 years ago
Discuss 2D gameplay and how new platforms such as cell phones are taking advantages of this renewed market
ankoles [38]
2D games are games that are made in the second dimension. These games are can be any type of game from platforms like Mario or adventure games like Terraria.  These games are big in the mobile games market because they are simple due to them only having 2 dimensions. This makes it easy for the players because you either have to use a "joystick" to move the characters like in Terraria or push a button to do a certain action.<span />
8 0
3 years ago
6.67
kari74 [83]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The question is:

If you wanted to know how many instructions a computer executes per second, which of the following numbers would  you want?

  1. clock speed
  2. binary digitization
  3. processor rating
  4. CPU power differential

The correct answer is clock speed. Because you can measure the performance of speed of the computer by its clock speed that how many instructions it can execute per second.

It also depends on clock time, instruction count, clock per instruction

5 0
3 years ago
Respond to the following in three to five sentences. Select the workplace skill, habit, or attitude described in this chapter (a
Katyanochek1 [597]

Answer:

communication and proactive

Explanation:

Communication is the most important thing and not only for a successful employee, is for successful life, in a company, there are a lot of people working in different areas, and sometimes we must interact with other departments to complete the task, a good communication help us to create a good experience and relationship with our partners, we're going to get efficient results.

If we want to ask more resources to our boss, we must show the needs and the benefits that company going to get, with a good presentation, inform and communication this can be easy to do, or if we are the boss, and we want to give trust our employees, we must have a good communication skills.

If we are proactive, we are going to result in almost every problem, in some companies the training is bad, we must learn process and attitudes for our job, some people are stingy with the knowledge, and we must find solution for our self, in this way we're going to be more independent, and our value increase in the company and even in the working market.

7 0
3 years ago
What are two advantages of edge computing over cloud computing?
gladu [14]

Answer: Better Data Management

Explanation:

The main benefits of edge computing over cloud computing are: Better data management. Lower connectivity costs and better security practices. Reliable, uninterrupted connection.

6 0
2 years ago
Other questions:
  • Which spereadsheet type will determine<br> how well a bussiness has done over the past year
    11·1 answer
  • Which of the following best describes a toolbar?
    9·1 answer
  • Hannah had been a newspaper carrier for four years. Each year she delivered more papers then the year before. The first year she
    13·1 answer
  • Insurance can help you:
    10·1 answer
  • What options does the business user have to manually share individual records? A new custom object is being created with a priva
    10·1 answer
  • Match the data types to the types of value they are: Currency, Text, Date/time, and Name.
    11·1 answer
  • Rosa has received reports by several users that one of the Linux servers is no longer accessible. She is able to remote into the
    10·1 answer
  • Now that you have learned the basics of acquiring relevant information through research, it's time to put your skills to work.
    7·1 answer
  • What is the difference between DWT and CWT?
    11·1 answer
  • A social service agency hires accenture to improve training and experiences for caseworkers. What is one way accenture can use v
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!