+ 1
While Loop code isn't optimal in the Second question
So in the basic stuff section we learn about the ++ operator. Why does the code question have you answer the suboptimal x=x+1 instead of having us do x++ since we know the ++ operator exists?
1 ответ
+ 10
x=x+1 is still not bad!
x++ isn't better, it's just shorter
take a look at this
https://www.google.pl/url?sa=t&source=web&rct=j&url=https://stackoverflow.com/questions/19527695/difference-in-implementation-of-x-x-1-and-x&ved=0ahUKEwir27yhppnXAhVKb1AKHYvdC_4QjjgIJTAA&usg=AOvVaw2TFEp8Ok5oW9_MZMjZPPbV