+ 1
a question from c# challenge
What is the output of this code. int prd=1 for (int x= 5; x< 10; x += 3){ prd *= x; } Console.Write(prd) ; *Please explain this*
3 Answers
+ 1
is it 40
+ 1
40 is correct.
I placed some extra lines in the code, to show how it works.
note that x *= prd is equal to x = x * prd
https://code.sololearn.com/cR3wOZ4PG1lv/?ref=app
0
thnx