Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 . 2 6 LAB: Caffeine levels A halflife is the amount of time it takes for a substance or entity to fall to half

2.26 LAB: Caffeine levels
A halflife is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half infe of about 6 hours in humans. Given caffeine amount (in mg) as input, output the caffeine level after 6,12, and 24 hours
Output each fioating point value with two digits after the decimal point, which can be achieved as follows
printf("0.21f**, yourvalue);
Ex. If the input is.
100
the output is
After 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 misnomes) has between 100mg and 200mg
LAs
actritr
2261 LAB. Caffeine levels
010
main.c
Lond defautt template.
1 zinclude stdio. h>
2
3 int matn(votd)f
4 double coffeine Mg : /1 "double" supports floating-point tike 75.5, versus int for integers like 75.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions