multiplying by 2 in a loop

PROBLEM :
Print out a table based on the number of days the user enters starting at one. List the pay for each day, the first days pay is a penny, but the pay doubles every day. Announce when the worker has earned $1000 and $1000000at the job.


but when it comes to multiplying the double ".01 "in a loop, I can't figure it out.I did something like :

while (pay < 1000) {
cout << pay <<;
pay * 2;

but it doesn't loop and multiply the pay! is there a way to use multiplication instead of the incrementer ++?
Well, you're not actually multiplying the variable, 'pay'. To do that, you must use pay = pay * 2. Hopefully, this gets you started.
oh wow, thank you so much
~
!!!!!!!
@soundman7085 You're very welcome...
Topic archived. No new replies allowed.