0
While loop
Can we write "num++" on "num=num+1"..? And if no then why.?
2 ответов
+ 2
Depends on what your while loop looks like. If you do it like this (see code sample), it does make a difference. I have to admit that this is usually not what you expect a while loop to look like though
https://code.sololearn.com/cQZ8SDT9Fj8B/?ref=app
+ 1
You can. num++ is short writing of num = num+1, that's why many programmers (maybe all of themm) use num++