#include <stdio.h>
unsigned int func(unsigned int n)
{
return (n == 1)? 1 : n * func(n-1);
}
int main(void)
{
unsigned int n = 0, rval = 0;
printf("Input data:");
scanf("%u", &n);
if (n == 0)
{
printf("Input error.\n");
return -1;
}
rval = func(n);
printf("%u!=%u\n", n, rval);
return 0;
}