romasha ali

romasha ali

  • 2k
  • 94
  • 32.2k

factorial ?

Mar 4 2014 6:03 PM
i use the following code for factorial is that correct? but it didn't show the result 
 
{
class Program
{
static void Main(string[] args)
{
int number = int.Parse(Console.ReadLine());
for (int i = number; i ==1; --i)
{
number = number * (i);
Console.WriteLine(number);
}
}
}
}
 

Answers (3)