#include <stdio.h> int main() { int i=1,n; long sum=1; printf("enter a positive integer:"); scanf("%d",&n); for(i=1;i<=n;i++) sum*=i; printf("sum=%d\n",sum); }