I would like someone to explain the difference between a while and a do while in C++
I just started learning C++ and with this code I seem to get the same output:
int number =0; while (number<10) { cout << number << endl; number++ } and this code:
int number=0; do { cout << number << endl; number++ } while (number<10); The output is both the same in these both calculations. So there seem to be no difference. I tried to look for other examples but they looked way to difficult to understand since it contained mathemetical stuff and other things which I haven't quite learned yet. Also my book gives a sort of psychedelic answer to my question.
Is there an easier example to show the difference between these 2 loops?
I was quite curious
int number = 11?