Write programs to calculate the factorial of a number using a while loop.
Answers
Answered by
2
Answer:
Factorial Program using loop
#include<stdio.h>
int main()
{
int i,fact=1,number;
printf("Enter a number: ");
scanf("%d",&number);
for(i=1;i<=number;i++){
fact=fact*i;
Explanation:
here is your answer if youlike my answer please follow
Answered by
0
Answer:
Explanation:
Factorial Program using loop
#include<stdio.h>
int main()
{
int i,fact=1,number;
printf("Enter a number: ");
scanf("%d",&number);
for(i=1;i<=number;i++){
fact=fact*i;
Similar questions