Answer to Question #17174 in C# for abcg_jack

Question #17174
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)");

}

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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS