Help with Event Controlled Loop.

This is a discussion on Help with Event Controlled Loop. within the C++ Programming forums, part of the General Programming Boards category; I am just a student who have a programming class that is not related to my course.
So I am ...

Help with Event Controlled Loop.

I am just a student who have a programming class that is not related to my course.
So I am helping for your help guys.

This is the needed output:

Enter Amount Borrowed: 5000
Payment # 1: 1000
Current Balance: 4000

Payment # 2: 2000
Current Balance: 2000

Payment # 3: 1000
Current Balance: 1000

Payment # 4: 100
Current Balance: 900

Payment # 5: 500
Current Balance: 400

Payment # 6: 400
Current Balance: 0

YOU ARE PAID!

I try my best to answer this. When i insert the code below, its not adding the input value while loop. For example, The amount borrowed is 5000, i enter 1000. So the current balance is 4000, when i enter 500, it must be 3500, right ? but its still 4500 on the screen. So its not adding while loop. here's my code:

I can the change the code to all sorts of things. What you need to do is to change the code so that it works -- your loop runs on ab, so either change your loop to run on something else, or make sure ab changes inside the loop. Which one you need to do depends on how you want the program to work, and only you know how you want the program to work.

I can the change the code to all sorts of things. What you need to do is to change the code so that it works -- your loop runs on ab, so either change your loop to run on something else, or make sure ab changes inside the loop. Which one you need to do depends on how you want the program to work, and only you know how you want the program to work.

No, That's just our assignment. That's not my invention, you know what i mean ? The given output above is the needed program. Please help me.

I can the change the code to all sorts of things. What you need to do is to change the code so that it works -- your loop runs on ab, so either change your loop to run on something else, or make sure ab changes inside the loop. Which one you need to do depends on how you want the program to work, and only you know how you want the program to work.

If someone will ask you to make a program with an output stated above, What code will you give ?