0

Can anyone understand "/="

I've Ques... in which a loop is there... what is happening with - "a/=a++" https://code.sololearn.com/c4iB7k531HZ4/?ref=app

6th Jan 2018, 5:00 AM
Vatsal Singh
Vatsal Singh - avatar
1 Answer
+ 8
initially a=3 and a>1so sum=3; now a/=a++; i.e.,a=3/3++;before 3 gonna increment ,a is assigned as a=3/3 ,which is 1. if a/=++a, it should be a=3/++3; a=3/4; and a=0
6th Jan 2018, 5:59 AM
Hannah Grace
Hannah Grace - avatar