+ 2
how this code i want explanation
static int Pow(int x, int y=2) { int result = 1; for (int i = 0; i < y; i++) { result *= x; } return result; }
2 Respostas
+ 21
It is a code for power number:
if you input only 2 (y is default)
it will power 2 meaning is 2*2=4
if you talk on looping:
loop 1 i=0 x=2 result=2
loop 2 i=1 x=2 result=4
and it output 4
+ 2
No the Output is 36