I solved this task with a while loop.
The conditions also allow a for loop, but I can't figure out how to to it with a for loop.
Anyone knows?
Thanks in advance :)
for loop?
Resolved
Comments (5)
- Popular
- New
- Old
You must be signed in to leave a comment
Misiu
13 December 2020, 11:40useful
for (;;) {
........... (the same instructions as in WHILE(true) loop)
}
+1
Nouser
13 December 2020, 11:53
or that ;)
0
Jurij Thmsn
13 December 2020, 13:03
thank you :)
0
Nouser
13 December 2020, 11:35solution
The for loop isn't that pretty.
number is declared in line 3 cause of the while loop. Othewise it could have been done in the for loop header. +2
Jurij Thmsn
13 December 2020, 13:03
Thanks! :)
0