Some questions on while loops
- What is wrong with the following loops?
-
i = 4;
while (i>3){
printf("hi there");
i++;
}
-
i = 3;
while (i>3){
printf("hi again");
i--;
}
- Write them into programs to test them.
Sample answers to these questions.
Back to notes on while loops.