2.2 LAB: Caffeine levels A half-life is the amount of time it takes for a substance or entity to fall to half its origin

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

2.2 LAB: Caffeine levels A half-life is the amount of time it takes for a substance or entity to fall to half its origin

Post by answerhappygod »

2 2 Lab Caffeine Levels A Half Life Is The Amount Of Time It Takes For A Substance Or Entity To Fall To Half Its Origin 1
2 2 Lab Caffeine Levels A Half Life Is The Amount Of Time It Takes For A Substance Or Entity To Fall To Half Its Origin 1 (50.56 KiB) Viewed 7 times
2.2 LAB: Caffeine levels 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-life of about 6 hou humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 24 hours. Output each floating-point value with two digits after the decimal point, which can be achieved by executing cout << fixed << setprecision (2); once before all other cout statements Ex: If the input is 100 the output is After 6 hours: 50.00 mg After 12 hours: 25.00 mg After 24 hours: 6.25 mg Note: 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. 397036 2648356 amy LAB ACTIVITY 1 #include <iostream> 2 #include <iomanip> 3 using namespace std; 7 8 9 2.2.1: LAB: Caffeine levels 5 int main() ( 6 double caffeineMg; // "double supports floating-point Like 75.5, versus int for Integers Like 75, cin >> caffeineMg; / Type your code here. / 10 11 12 13 14 main.cpp return 0; 0/10 Load default template.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply