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
Which of the following is the best example of a manager with a delegator leadership style
Vera_Pavlovna [14]
I think the answer should be answer D.
8 0
3 years ago
Read 2 more answers
What are seven main internal parts of a computer
Alexandra [31]
The hard drive
the power supply
the ram
the heat sink
the cpu
the motherboard
expansion slots
6 0
3 years ago
Read 2 more answers
What two statements about IPv6 addresses are true? This task contains the radio buttons and checkboxes for options. The shortcut
Oliga [24]

Answer:

A and C

Explanation:

Option A:

In IPv6 there is a rule to reduce an IPv6 address when there are two or more consecutive segments of zeros just one time. This rule says that you can change the consecutive zeros for “::”  

Here is an example

How to reduce the following IPv6 address?

ff02:0000:0000:0000:0000:0000:0000:d500

Ans: ff02::d500

Example 2:

2001:ed02:0000:0000:cf14:0000:0000:de95

Incorrect Answer -> 2001:ed02::cf14::de95  

Since the rule says that you can apply “::” just one time, you need to do it for a per of zero segments, so the correct answer is:

Correct Answer -> 2001:ed02::cf14:0:0:de95

Or

2001:ed02:0:0:cf14::de95

Option C:

Since in IPv6 there are 2^{128} available addresses which means 340.282.366.920.938.463.463.374.607.431.768.211.456 (too many addresses), there is no need of NAT solution, so each device can have its own IP address by the same interface to have access through the internet if needed. If not, you can block the access through internet by the firewall.

4 0
3 years ago
etwork behavior analysis system __________ sensors are typically intended for network perimeter use, so they are deployed in clo
jeka94

Answer:

"Inline" is the correct answer.

Explanation:

  • Network behavior analysis (NBA)  or Analysis of network activity seems to be the technique to observe traffic trends that aren't groups or sets throughout the cable network's everyday traffic.
  • Simplest terms, this is the organization's effort to define network anomalies outside pure congested traffic expect a seamless.

So that the above is the correct answer.

6 0
3 years ago
What are the two compatibility issues that may arise between computer systems while transferring presentations? different video
Mamont248 [21]

Different video files and operating system versions can cause compatibility issues to arise between computer systems.

Since, file formats and operating systems may not be compatible with each other. For example, earlier versions of Windows may not be able to play certain types of video files due to the codecs used to encode them.

<h3>Importance of compatibility between operating system computer systems</h3>

Compatibility between operating systems is important because it allows different computer systems to interact and share resources. This includes sharing of programs, files, and data.

Compatibility also allows users to access applications and services on different platforms. It also enables efficient use of hardware and software resources, as well as efficient use of resources in a network. Compatibility also ensures that computer systems can communicate with each other and can access the same resources. Without compatibility, it would be difficult for computer systems to interact with each other.

What are two compatibility issues that may arise between computer systems while transferring presentations? (Fill in the blank).

Different video files and _____ can cause compatibility issues to arise between computer systems.

Learn more about Compatibility between operating systems:

brainly.com/question/24760752

#SPJ4

4 0
1 year ago
Other questions:
  • A professor is working with five teams in his marketing research class. He decides to experiment with path-goal theory in helpin
    11·1 answer
  • A common technique for masking contents of messages or other information traffic so that opponents can not extract the informati
    14·1 answer
  • as the new hr manager hired by a company to clean up some of the company's problems,analyse the system requirements for the comp
    14·1 answer
  • In pseudocode you can use the _________ library function to determine whether a character is an alphabetic letter.
    12·1 answer
  • Victor works for a telemarketing company that is on a very tight budget. He has been tasked with finding a method for the compan
    7·2 answers
  • Which of the following operation is not performed by a mouse 1) left click , middle click , right click, double click​
    15·2 answers
  • In order to detect repeated lines anywhere in the input, myuniq must keep track of all of the lines it has seen as it moves thro
    9·1 answer
  • Which family does Ms word 2007 belongs to?​
    6·2 answers
  • Budgeting for a Computer
    6·1 answer
  • A. A set of electronic program that makes of computer perform tasks
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!