public static void Fact(int number) { int fact = 1; for (int i = number; i > 0; i--) { fact = fact * number; number--; } Console.WriteLine(fact); }Thanks, Karthik KK
public static void Fact(int number) { int fact = 1; for (int i = number; i > 0; i--) { fact = fact * number; number--; } Console.WriteLine(fact); }Thanks, Karthik KK