Question: 2 . 2 6 LAB: Caffeine levels A halfilife is the amount of time it takes for a substance of entify to fall to half

2.26 LAB: Caffeine levels
A halfilife is the amount of time it takes for a substance of entify to fall to half its original value Caffeine has a half life of about 6 hours in humans Given cafferne amount (in mg) as input, output the caffeine level after 6,12, and 24 hours
Output each foating point vatue with two digits after the decimal point, wh ch can be acheved as follows: printe ("10.21f", yourvalue);
Ex: If the input is:
100
the output is
Arter 6 hours: 50.00mg
After 12 hours: 25.00mg
After 24 hours: 6.25mg
Note A cup of coffee has about 100mg A soda has about 40mg. An 'energy' drink (a misnomet) has between 100mg and 200mg.
un
activir
2.26.1: LAB Caffeine levels
010
main.c
Losd default template.
Finclude estdio. h>
int main(void) f
double caffeinelg; // "double" supports floating-point like 75.5, versus int for integers like 75.
scanf("sif",8caffeine Mg):
 2.26 LAB: Caffeine levels A halfilife is the amount of time

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!