Running on a particular treadmill, you burn 3.9 calories per minute. Create an application that uses a loop to display the number of calories burned after 10, 15, 20, 25, and 30 minutes.
1
Expert's answer
2012-10-25T10:37:48-0400
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Calories
{
class Program
{
static void Main(string[] args)
{
for (int i = 1; i < 30; i++)
{
double calories = i * 3.90;
Console.WriteLine(calories + " burnt after " + i + " minute(s)");
Comments
Leave a comment