Hi,

E.g:

User enters: 3

It prints 3 and calculates the data

1 1000
2 2000
3 3000

then if is 3 it stops printing and calculating,then it shows the total:

1 1000
2 2000
3 3000

Total: 6000

How can i achieve this??
Thanks a lot!!!