Program to find factorial/product of first n natural numbers using for loop
Requirement: Algorithm Program (Without Function) #include<stdio.h> int main() { printf(“***************************************************************”); printf(“\n***************************************************************”); printf(“\n** WAP to print factorial/product of first n natural numbers **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n***************************************************************”); printf(“\n***************************************************************\n”); int n,p=1,i; printf(“Enter no upto which you want to multiply\n”); scanf(“%d”,&n); for(i=1;i<=n;i++) p=p*i; printf(“factorial/Product of first %d …
Program to find factorial/product of first n natural numbers using for loop Read More »