• Running on a particular treadmill you burn 3.9 calories per minute. Write a program that uses a loop to display the number of calories burned after 5, 10, 15, 20, 25 and 30 minutes. Use a while{} loop construct to solve this problem.
1
Expert's answer
2012-11-06T10:23:01-0500
#include <iostream> using namespace std;
int main () { inti = 0; do { doublecalories = i * 3.90; cout<< calories << " burnt after " << i << " minute(s)" << endl; i++; }while(i <= 30);
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Dear IBN, thank you for answer.
i=10; while(i
Leave a comment