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
stiv31 [10]
3 years ago
12

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. 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 mgAfter 12 hours: 25.000000 mgAfter 18 hours: 12.500000 mgNote: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer) has between 100 mg and 200 mg.
Computers and Technology
1 answer:
Elena L [17]3 years ago
8 0

Answer:

// here is code in java.

import java.util.*;

class Solution

{

// main method of class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // declare variable

         double caffeine;

    // scanner object to read input from user

       Scanner scr=new Scanner(System.in);

       System.out.print("Enter the initial amount of caffeine:");

        // read the initial amount of caffeine

           caffeine=scr.nextDouble();

          // calculate amount of caffeine after 6,12,18 hours

          for(int i=1;i<=3;i++)

          {

               System.out.println("After "+ i*6+" hours:"+(caffeine/2)+" mg");

               // update the caffeine after every 6 hours

               caffeine=caffeine/2;

          }

                 

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create a variable "caffeine" to store the initial amount of caffeine given by user. Run a loop for three time, it will calculate the amount of caffeine left after every 6 hours.First it will give the amount of caffeine left after 6 hours, then caffeine left after 12 hours and in last caffeine after 18 hours.

Output:

Enter the initial amount of caffeine:100

After6 hours:50.0 mg

After12 hours:25.0 mg

After18 hours:12.5 mg

You might be interested in
9. What is composition? Why is composition important?
Veronika [31]
Composition- a work of music, literature, or art

This is important because art helps people express oneself
4 0
3 years ago
Pseudocode is an improvement over the IPO chart because it lays out the a0 sequence of steps for a particular program.
Olegator [25]

Answer:

Yes. Pseudocode is an improvement over the IPO chart because it lays out the sequence of steps for a particular program

Explanation:

The input–process–output (IPO) chart is a widely used approach in systems analysis and software engineering for describing the structure of an information processing program or other process. The chart has three components (Input, Process and Output), and you write the description of each component in plain English, not code or mathematical formulas.

Pseudocode is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed.

Pseudocode is an improvement over the IPO chart because it shows the step by step sequence to be followed by a particular program unlike the IPO chart which just break the program into Input, Process and Output.

6 0
3 years ago
If a company's IS-related programs are not developed in-house, then the development group of the IS department will be staffed p
EastWind [94]

Answer:Systems analysts

Explanation: System analyst is referred as the person in an organization for resolving the issue related program and information technologies. The person basically design the solution by analyzing the problem accordingly.

Information system of company has any separate department for handling the problems related with the IS-related programs. These problem usually lies under the department of the system analyst. They work on the problem solving, improvement and improvisation, training etc.

3 0
3 years ago
Which of the following is not a benefit of shaping data with the Power Query Editor?
algol13

Answer:

A

Explanation:

I am not 100% sure but without the shaping data, data can still be merged from multiple sources.

3 0
2 years ago
If you came across an article that discussed the benefits of studying the night before a test rather than the morning of, what c
Marina CMI [18]

Answer:

A. Do your own research including reading articles related to the same topic.

Explanation:

To confirm online information that is not made by reputable experts, professionals, journals, or websites, it is always recommended to cross-check such information carefully. To do that is to make research on the same topic and confirm if the actual information is the same.

Hence, in this case, the correct answer is "Do your own research including reading articles related to the same topic."

5 0
3 years ago
Other questions:
  • What type of product does amd manufacture
    5·1 answer
  • If a hypothesis is strongly supported by the scientific community based on compelling experiment results, it becomes a————
    10·2 answers
  • After Lola gave her friend the password to a protected website, her friend was able to remember it only long enough to type it i
    7·1 answer
  • what you can do to increase your chances of getting employed with changes to your current digital footprint​
    6·1 answer
  • to edit text boxes in a template, first A click on the text box you want to edit B begin typing C format the front D drag the te
    5·2 answers
  • When you are working in Performance Monitor, in the "Add Counters" dialog box, and need more information about a particular coun
    8·1 answer
  • What is the error in this?<br><br> userGuess = int(input(“Guess a number between 1 and 20: “))
    12·1 answer
  • PLS HELP ILL GIVE BRAINLY- (enter the answer) Microsoft _________ is an example of a desktop publishing software
    13·2 answers
  • Mrs. Schlair has an annual salary of $96,402.<br> a. What would her semimonthly salary be?
    9·1 answer
  • Why does computer uses 0s and 1s to procress data​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!