C Program to Print Armstrong Number from 1 to 1000
C Program to find factorial of number using Recursion
This Program prompts user for entering any integer number, finds the factorial of input number and displays the output on screen. We will use a recursive user defined function to perform the task. Here we have a function find_factorial that calls itself in a recursive manner to find out the factorial of input number. We have involved the user interaction in the below program, however if you do not want that part then you can simply assign an integer value to variable num and ignore the scanf statement. In short you can tweak it in any way you want, the logic would be the same for each case.
Source code:
#include
int find_factorial(int);
int main()
{
int num, fact;
//Ask user for the input and store it in num
printf("\nEnter any integer number:");
scanf("%d",&nu.... Show More
All Chapters — C programming
Similar Questions
From C programs on various integers · C programming
C Program to check Leap Year:
C Program to Check whether an Alphabet is Vowel or Consonant
C Program to Find Multiplication of two Binary Numbers:
C Program to find prime numbers in a given range
C Program to Check whether a given Number is Perfect Number:
C Program to Find the Sum of two Binary Numbers:
C Program to Check whether a given Number is Armstrong: