Program that uses a loop to display the number of calories

Assignment Help C/C++ Programming
Reference no: EM131912884

Need some help to write a program that uses a loop to display the number of calories burned after running on a treadmill for 10, 15, 20, 25, and 30 minutes. Running on a treadmill burns 3.9 calories per minute.

Sample Output from Program:

39.0 calories were burned after 10 minutes.

58.5 calories were burned after 15 minutes.

78.0 calories were burned after 20 minutes.

97.5 calories were burned after 25 minutes.

117.0 calories were burned after 30 minutes.

Press any key to continue....

Using the pseudocode below, write the code that will meet the requirements.

Display program information

Declare variables

For i=10 to 30 step 5

Print i*calories

End for

Reference no: EM131912884

Questions Cloud

Displays the information about the movie : researching constructors and dimensions. Can someone assist with explaining how to code such an example
Prepare journal entries for april to record transactions : Materials purchases (on credit). Direct materials used production. Prepare journal entries for the month of April to record the above transactions.
What is the best estimate for the population mean : What is the best estimate for the population mean? The best estimate for a population mean for the dive scores in the Olympics is 900
What would happen to the break-even point : What would happen to the break-even point if the selling price was raised to $33? What is the significance of this analysis?
Program that uses a loop to display the number of calories : Need some help to write a program that uses a loop to display the number of calories burned after running on a treadmill for 10, 15, 20, 25, and 30 minutes.
What are the two projects net present values : What are the two projects' net present values, assuming the cost of capital is 5%? 10%? 15%?
Conduct an appropriate hypothesis test : Conduct an appropriate hypothesis test using (i) the p-value method and (ii) the rejection point method.
What is the optimum order size : Massa Machine Tool expects total sales of $14,000. Price per unit is $8. Firm estimates an ordering cost of $13.28 per order. What is the optimum order size?
What is the importance of putting functions in a program : What is the importance of putting functions in a program? How does structure play a role in the code that is being modifying? How will it play a role

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Prepare a c function that returns the number of elements

Prepare a C function that returns the number of elements smaller than 3.0 in an array - make a function returns the number of elements.

  Write and test a function to calculate the sum of the series

stop accumulating the sum when the term to add or subtract becomes smaller than a given small number(precision) oassed as an argument.

  Program to implement an abstract data type rational-numbers

You are writing a program to implement an abstract data type Rational-Numbers. A rational number has two parts, numerator and denominator. Example 1/2 and 3/5 are rational numbers. You can perform math operations on rational numbers and the result..

  Write a c++ program to first find ''n'' fibonacci numbers

Write a C++ program to first find 'N' Fibonacci numbers and then display only the "even" Fibonacci numbers in "descending order" as output.

  Create two int variables x and y and initialize them

Create two int variables x and y and initialize them to 5 and 10 respectively. Create two int pointers, ptr1 and ptr2, and initialize them to point to x and y.

  Write a program in c using function, float pos_power

Write a program in C language. Write a function, float pos_power(float base, int exponent); which returns the value of base raised to a positive exponent. For example, if base is 2.0 and exponent is 3, the function should return 8.0. If the expone..

  Display the equivalent prices

Test your application with 1.259 per liter against 4.50 per gallon. Once the decision is made, display the equivalent prices. (1 liter is 0.264172 gallons)

  Write a program to print the permutation

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation.

  Display currency conversion for us dollar

Write a MATLAB script to display currency conversion for US Dollar, British Pound, Euro with Singapore Dollar as the base Currency. Your output should show the equivalent values for USD, GBP, EURO for every Singapore dollar in increments of 1 doll..

  Write a c program that outputs a table of values of t

Write a C program that outputs a table of values of t and l!C , The user enters the range of time desired in seconds and the incre­ ment in fractions of a second, the source current Us) in amperes, the resistance (R) in ohms, the initial voltage ..

  What is the output of the given program

What is the output of the following program? summer(intNum1, intNum2); cout

  Write a function that normally takes one argument

Write a function that normally takes one argument, the address of a string, and prints that string once. However, if a second, type int, argument is provided.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd