The following program takes n,a positive integer as input.what is the purpose of the program? #include
int main()
{
int n,i;
unsigned long long result=1;
printf("enter an integer: ");
Scanf("%d",&n);
for(i=1;i<=n;++i)
{
result*=i
}
printf("the output of the program is %ilu",result);
return 0;
}
A)n multiplied by n times
B)factorial of n
C) display factors of n
D)display Fibonacci series up to n
Answers
Answered by
1
Answer:B) factorial of n
Explanation:
Just try executing it manually by taking a random value of n.
Similar questions