#include <stdio.h>
#include <stdlib.h>
const int NO_FACT=10;
const int MAX_LEN=255;

int main (int argc, char *argv[])
{
    int i;
    int factorials[NO_FACT]; /* Array of NO_FACT factorials */
    char input_str[MAX_LEN]; /* String for user input */
    int fact_no;             /* Factorial user wants */
    /* Calculate the first NO_FACT-1 factorials */
    factorials[0]= 1;  /* The factorial of 0 is defined to be 1 */
    for (i= 1; i < NO_FACT; i++) {
        factorials[i]= factorials[i-1]*i;
    }    
    fgets (input_str, MAX_LEN, stdin);  /* Read input from user */
    fact_no= atoi (input_str);
    /* Write code to check fact_no is in the right range here */
    printf ("Factorial of %d is ",fact_no);
    /* Write code to output the right number here */
    return 0;
}


