Well guys Im basicly new to C so take it ez with me >_<..
I got a project in which I had to enter a number and the computer should output if it has a factorial or not.
I dont know why but the problem I have is that when I input a number which has a factorial it says No Factorial,No FactorialNo FactorialNo Factorial then the Answer Correctly.. I wish someone could help me..
I believe the error in here..
Code:i = 2; facttemp = 1; while (facttemp<=pfact){ facttemp= facttemp*i; i++; if (facttemp==pfact){ x = i - 1 ; printf("\n\n\tEl numero tiene factorial, el factorial es %d", x); return 0;} else printf("No tiene factorial"); getch();} return 0; }