Hi, im new to C++. I wrote this code to count from 1 to 9999 using loops, problem is that it only counts upto 8999. Any help would be greatly appreciated
Why not use a single variable to store this in? To solve your problem with this current code, change rule 18 to: while (i1<=9)
It's much easier to do it with a single variable, though.
The reason never used a single variable is because im learning how things in C++ programming work & using the loop suggested by markXD07 would have been too easy. I wanted to write something a little more complex - spice things up a bit. I have learnt more from this code i wrote than i would have learnt if i did it the easy way : )