This one is subtle and took me a minute or two of looking.
There is a difference between
i=+10 // Assigns the value 10 to i == (i = 10)
i += 10 // increments by 10
This is the reason for the infinite loop.
There is another bug with the program regarding the termination point.
Sorry I think I might have confused you. I mean that the for loop will terminate early the way you have written it.
Have you Ran it since correcting the other issue?
Please Enter Treadmill Type:
Please Enter Number of Minutes X:
Calories burned after 10 minutes : 39
Calories burned after 20 minutes : 78
Calories burned after 30 minutes : 117
Your current for loop doesn't continue until 40.
I am not trying to be difficult, but debugging skills are very important. Do you use an IDE or run the program from the command line?
im sorry for an interruption here in your post. Actually i wanted to post a new thread. and after i sign in and go to new posts , i dont find an option "post a new thread" anywhere .. could you please help me with that and where exactly i can do that..
Thank you in advance ..