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.
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)");
}
Console.ReadKey();
}
}
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C#