hi
could someone help me to format this factorial with commas, to final answer in this factorial loop?
thanks
could someone help me to format this factorial with commas, to final answer in this factorial loop?
Code:
private void btnCalculate_Click(object sender, EventArgs e) { { decimal number = Convert.ToDecimal(txtNumber.Text); decimal factotorial = 1; for (int i = 1; i <= number; i++) { factotorial *= i; } txtFactorial.Text = factotorial.ToString(); } }
Comment