I have done a program, it works but i used a book to help me as i was seriously stuck and unsure what i have actually done in fields

"register an integar" as i normally put int iCount (iCount my integar i nominate)

"Long factorial"

and "Return 0" as i use getch(); normally

My code:
Code:
/* Name:

Cameron Owen
CIC Y1 G1
Software Development
Factors

*/

#include<stdio.h>
int main()
{
register int count;                         
int iCount;				
long factorial;
printf("Compute the factorial of what number?");       	
scanf("%d",&iCount);
for (factorial =1L, count=1; count<=iCount; count++)
	factorial *=count;
printf("%d!=%d\n",iCount, factorial);                    
return 0;														
}

Last edited by shabbir; 26Oct2006 at 10:19.. Reason: Code formating.