0

Need help, (x)++

int x = 42; do { Console.WriteLine(x); x++; } while(x < 10); I donā€™t really understand the Ā«x++;Ā» what does it do?

24th Nov 2017, 8:57 PM
frans lol
frans lol - avatar
3 Answers
+ 1
it is the same as "x=x+1", you actually adding 1 to your variable. so in your case x = 42 + 1
24th Nov 2017, 9:04 PM
Sipelo Nokele
Sipelo Nokele - avatar
0
Just faster way to write x=x+1
24th Nov 2017, 9:26 PM
ŠžŠ±Ń€Š°Š“Š¾Š²Šøћ ŠŠ½Š“рŠøјŠ°
ŠžŠ±Ń€Š°Š“Š¾Š²Šøћ ŠŠ½Š“рŠøјŠ° - avatar
0
x++ means add number 1to your int ex( 42+1) but ++x. or x--means substruct 1 ex(42_1)
24th Nov 2017, 10:11 PM
chedni