0

What it use sum =sum+1;

What it use sum =sum+1; if it dont have any function why do we need to put it in the code

17th Aug 2017, 6:12 PM
Muhammad Nazri
Muhammad Nazri - avatar
3 Respostas
+ 2
This increments sum by one.
17th Aug 2017, 6:43 PM
Rrestoring faith
Rrestoring faith - avatar
0
thnx
17th Aug 2017, 6:44 PM
Muhammad Nazri
Muhammad Nazri - avatar
0
you can use it for counter based loops e.g.: for (int i=0;i<10;){ do somthing .... i=i+1; // or you write i++; }
17th Aug 2017, 6:53 PM
T0nd3