0% found this document useful (0 votes)
17 views1 page

#Include #Include Int Main (

This C program calculates the factorial of numbers input by the user. The user first inputs the number of values to process, then inputs those values. The program then loops through each input value and calculates its factorial by multiplying it by all positive integers less than or equal to it, outputting each result.

Uploaded by

Akash Mahalik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

#Include #Include Int Main (

This C program calculates the factorial of numbers input by the user. The user first inputs the number of values to process, then inputs those values. The program then loops through each input value and calculates its factorial by multiplying it by all positive integers less than or equal to it, outputting each result.

Uploaded by

Akash Mahalik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

#include<stdio.

h>
#include<conio.h>
int main()
{

int t, n[100];
scanf("%d", t);
for(int i=0; i<t; i++)
{
scanf("%d", n[i]);
}
for(int i=0; i<=t; i++)
{
int x=1;
for(int g=n[i]; g>=1; g--)
x=x*g;
printf("%d", x);

}
return 0;
getchar();

You might also like