fork download
  1. //ANDREW ALSPAUGH CS1A CHAPTER 5. P. 294 # 4
  2. //
  3. /******************************************************************************
  4.  * Display Calories Burned
  5.  * __________________________________________________________________________
  6.  * This program calculates and displays how many calories a user has burned at
  7.  * time intevals incrementing by 5
  8.  * __________________________________________________________________________
  9.  * OUTPUT:
  10.  * ICal Amout of Calories burned in 1 minute
  11.  * Time 1 minute *
  12.  ***************************************************************************/
  13. #include <iostream>
  14. using namespace std;
  15.  
  16. int main()
  17. {
  18. float ICal;
  19. ICal = 3.9;
  20.  
  21. int Time;
  22. Time = 2;
  23.  
  24. cout << "Chart Displaying Time and Calories Burned" << endl;
  25.  
  26. while (Time <= 6)
  27. cout << Time * 5 << "\t\t" << ICal * (Time++ *5)<< endl;
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
Chart Displaying Time and Calories Burned
10		39
15		58.5
20		78
25		97.5
30		117