I am new to Programming. I was trying to write a code to get factorials. It seems to me that the the above code doesn't work. What am i doing wrong?Code:
#include<stdio.h>
int main ()
{
int i,number,factorial;
printf("Enter the Number for Factorial\n");
scanf("%d",&number);
for(i = 1;i <= number; i++)
{factorial = number*i;}
printf("\n %d ! = %d", number , factorial);
getch();
}
