Write a program to prompt the user and input the number of cups of coffee consumed. Given that each cup contains 130 mg of caffeine, compute and output the amount of caffeine consumed.
Being that 13% of the caffeine is eliminated each hour (in other words, 87% is retained) calculate and output the amount of caffeine in the body at the end of each hour for 24 hours.
Sample Output:
Enter number of cups: 2
Caffeine consumed (mg): 260
Write main() and no other functions. Output formatted as shown. Actual width of columns not important as long as the decimal points are lined up and there is one point to right of decimal point for real numbers.
/*
Write a program to prompt the user and input the number of cups of coffee consumed. Given that each cup contains 130 mg of caffeine, compute and output the amount of caffeine consumed.
Being that 13% of the caffeine is eliminated each hour (in other words, 87% is retained) calculate and output the amount of caffeine in the body at the end of each hour for 24 hours.
*/
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
//Declare variables
int numbofcups;
double caffeineconsumed;
int hour = 0;
//double caffeine;
//Input information
cout << " Enter number of cups:";
cin >> numbofcups;
cout << endl;