Computer Science, asked by diwakar5887, 1 year ago

Write a program in c to find the factorial of a given number (>0) using pointers. (the input is taken from the test case)

Answers

Answered by Anonymous
0

Factorial program in C using a for loop

#include <stdio.h>

int main()

{

int c, n, fact = 1;

printf("Enter a number to calculate its factorial\n");

scanf("%d", &n);

for (c = 1; c <= n; c++)

fact = fact * c;

Similar questions