Answer to Question #33151 in Visual Basic for People

Question #33151
Running on a particular treadmill you burn 3.9 calories per minute. Create an application (function) that uses a loop to display the number of calories burned after 10,15,20,25 and 30minutes
1
Expert's answer
2013-07-16T08:57:08-0400
Module Module1
'main function
Sub Main()
For i As Integer = 10 To 30 Step 5
Dim numberofcalories As Double = 3.8999999999999999 * i 'number of calories
Console.WriteLine(numberofcalories.ToString() + " calories burned after
" + i.ToString() + " minutes") 'show result
Next
Console.ReadLine() 'Delay
End Sub

End Module

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