Re: Loop Problems....

Posted 19 August 2008 - 11:11 PM

Be sure to prompt for a value prior to going into a sentinel loop. That way you can make sure everything is good and if the value is bad (like they want to escape) that the loop contents are never ran.

We also prompt again at the end of the loop to start the next while loop iteration.

Also make sure to initialize your float values properly.

Lastly, thank them after the work has been done and they have chosen to quit the program.

Re: Loop Problems....

Posted 19 August 2008 - 11:58 PM

Martyr2, on 19 Aug, 2008 - 11:11 PM, said:

Be sure to prompt for a value prior to going into a sentinel loop. That way you can make sure everything is good and if the value is bad (like they want to escape) that the loop contents are never ran.

We also prompt again at the end of the loop to start the next while loop iteration.

Also make sure to initialize your float values properly.

Lastly, thank them after the work has been done and they have chosen to quit the program.

Re: Loop Problems....

Posted 22 August 2008 - 09:01 AM

Please see this code
this is working properly but in the result is showing zero "0".....mean no interest
please see where is problem thanks
/* Example 3.20
In this example I will calculate the Interest rate on a said amount
depending upon tenure and its rate.
I will use while loop with a sentinel value.....in major..*/
#include <stdio.h>