(To calculate factorial of any interger useing recursive function) Programing/No-1

in factorial •  7 years ago 

#include<stdio.h>
ifinclude<conio.h>
#include<math.h>
long int factorial(int n);
void main()
}
. cIrscr()
; int n;
long int factorial(int n);
printf("Enter the value of n:");
scanf("%d",&n); printf("Factorial of %d is=%d",n,factorial(n));
getch();
}
long int factorial(int n)
(if(n<=1)
return(1);
else
return(n*factorial(n-1));
}

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This post has received a 0.26 % upvote from @drotto thanks to: @masudrana3363.

Your Post Has Been Featured on @Resteemable!
Feature any Steemit post using resteemit.com!
How It Works:
1. Take Any Steemit URL
2. Erase https://
3. Type re
Get Featured Instantly & Featured Posts are voted every 2.4hrs
Join the Curation Team Here | Vote Resteemable for Witness

To get upvote from @artzone, the post needs at least 300 characters! Please describe your work in detail ;-)