The explanation:
1- It'll output 10 since we didn't change it yet.
2- We'll increase i to 1 and num decreased to 9.
3- Increases i to 2 and num decreased to 8.
4- Increases i to 3 and num decreased to 7.
5- Increases i to 4 and num decreased to 6.
Then it ends, 'cause num will be 5 while i will be the equal, so it stops.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice one!
The solution is:
10
9
8
7
6
The explanation:
1- It'll output 10 since we didn't change it yet.
2- We'll increase i to
1
and num decreased to9
.3- Increases i to
2
and num decreased to8
.4- Increases i to
3
and num decreased to7
.5- Increases i to
4
and num decreased to6
.Then it ends, 'cause num will be
5
while i will be the equal, so it stops.