+ 2

Why the output of following result in 42

int a=4; int b=2; console.Write(a); console.Wite(b);

8th Mar 2017, 3:43 PM
Adam karrar hamid
Adam karrar hamid - avatar
5 ответов
+ 15
(Because I, 42, am the answer 😎) Be careful, the last line should say console.Write(b); And if this is C#, console should be Console. Sorry for nit-picking 😃
8th Mar 2017, 4:17 PM
Jafca
Jafca - avatar
+ 9
Because it's the answer to life, the universe and everything :)
8th Mar 2017, 7:19 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
because you have told it to output 4 and then immediatley after have told it to output 2 with no newline or space between them.
8th Mar 2017, 3:58 PM
Jason Hoffman
Jason Hoffman - avatar
+ 2
Because you are not adding a line break
8th Mar 2017, 3:57 PM
Alejandro Serrato
Alejandro Serrato - avatar
+ 2
tanx
8th Mar 2017, 3:59 PM
Adam karrar hamid
Adam karrar hamid - avatar