#include<stdio.h> int main(void) { int i,n; double product; printf("Enter n:"); scanf_s("%d",&n); product=1; for(i=1;i<=n;i++){ product=product*i; } printf("product=%.0f ",product); return 0; }
#include<stdio.h> int main(void) { int i,n; double product; printf("Enter n:"); scanf_s("%d",&n); product=1; for(i=1;i<=n;i++){ product=product*i; } printf("product=%.0f ",product); return 0; }