C-Program To Find The PRODUCT of Natural Numbers Upto a Limit
#include<stdio.h>
main ()
{
int product=1,n,i;
printf("Enter the Limit\t");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
product=product*i;
}
printf("Product of Numbers Upto %d is %d",n,product);
}
 |
| output |
No comments:
Post a Comment