/******************************************************************************
Online C Compiler.
Code, Compile, Run and Debug C program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <stdio.h>
int main()
{
int x;
for (x=0; x<20; x++)
printf ("%3d, ", x);
printf ("\n");
// 0-0-2-2-8-4-22-???-60
for (x=0; x<20; x++)
printf ("%3d, ", 2*(x/2) + 2*(x/4) + 2*(x>3) - 4*(x>4) + 16*(x>5) + 34*(x>7));
return 0;
}
def fact(n):
if n==1:
return 0
else:
return(n*fact(n-1))
n=int(input("enter a number:"))
print("the factorial of the given number is:%f"%fact(n))