this code to multiplication numbers fro 6 to 1 like this : 6*5*4*3*2*1 = 720
the problem is the result is : 0
the problem is the result is : 0
C#:
int sum = 0;
int n = 6;
for (int x = n; x > 0; x--)
{
sum *= x;
} textBox2.Text = sum.ToString(); // print : 0
Last edited by a moderator: