Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

An antibiotic loses 4% of its effectiveness every month it is in storage. When its effectiveness is below 50% it is considered expired and must

An antibiotic loses 4% of its effectiveness every month it is in storage. When its effectiveness is
below 50% it is considered expired and must be discarded. Using a while loop, code a  program that
determines how many months the drug can remain in storage before it must be discarded.
Your output must look like this:

 

MONTH                             EFFECTIVENESS
0                                         100.00
1                                          96.00
2                                         92.16
3                                          88.47
4                                          84.93
5                                          81.54
6                                          78.28
7                                          75.14
8                                          72.14
9                                          69.25
10                                          66.48
11                                          63.82
12                                          61.27
13                                          58.82
14                                          56.47
15                                          54.21
16                                          52.04
17                                          49.96 DISCARD!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Sure Heres a Java program that uses a while loop to determine how many months an antibiotic can rema... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Architecture Fundamentals And Principles Of Computer Design

Authors: Joseph D. Dumas II

2nd Edition

1032097337, 978-1032097336

More Books

Students also viewed these Programming questions

Question

Distinguish between short-term and long-term goals.

Answered: 1 week ago

Question

Using Gauss-Jordan elimination, invert this matrix ONLY 0 0 0 0 1

Answered: 1 week ago

Question

23. What causes astigmatismpg109

Answered: 1 week ago