+ 3
®[Challenge ] what is output ?
double x; int y; x = 44 .566; y = (int) (x); Console.WriteLine(y);
4 Respostas
+ 5
44
+ 5
what y = (int) (x) does is to cast x known as data casting, it forces x to be an integer which causes it to be terminated to the integer part.
P. S : I don't code in C# but there's something similar in Java and I think it works same way
+ 3
true
+ 1
44