fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7. double perMinute;
  8. double total;
  9.  
  10. perMinute = 3.9;
  11.  
  12. cout << fixed <<setprecision(1);
  13. for (int i = 10; i <=30 ; i+=5)
  14. {
  15. total = perMinute * i;
  16. cout << "Calories Burned in " << i << " minutes is ";
  17. cout << total << endl;
  18.  
  19. }
  20. // your code goes here
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
Calories Burned in 10 minutes is 39.0
Calories Burned in 15 minutes is 58.5
Calories Burned in 20 minutes is 78.0
Calories Burned in 25 minutes is 97.5
Calories Burned in 30 minutes is 117.0