NTech

Menu
  • Home
  • Technology
    • Internet
    • Market
    • Stock
  • Downloads
    • Dvd
    • Games
    • Software
      • Office
  • Parent Category
    • Child Category 1
      • Sub Child Category 1
      • Sub Child Category 2
      • Sub Child Category 3
    • Child Category 2
    • Child Category 3
    • Child Category 4
  • Featured
  • Health
    • Childcare
    • Doctors
  • Uncategorized

Friday, 7 August 2015

FIND FACTORIAL OF A NUMBER USING RECURSION IN C PROGRAM

By ntech00:57 No comments
#include<stdio.h>
#include<conio.h>
int fact(int);
void main()
{
  int num,f;
  clrscr();
  printf("\nEnter a number: ");
  scanf("%d",&num);
  f=fact(num);
  printf("\nFactorial of %d is: %d",num,f);

  getch();
}

int fact(int n){
   if(n==1)
       return 1;
   else
       return(n*fact(n-1));
 }

Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Pages

  • Home

Popular Posts

  • What Is A Motherboard? What Are The Different Components Of A Motherboard?
    What Is A Motherboard? What Are The Different Components Of A Motherboard? Image: Wikipedia Short Bytes: A motherboard acts as a pl...
  • Fingerprint scanners on Android phones are far less secure than on iPhones
    The  Samsung Galaxy S5's fingerprint reader security vulnerabilities  were well documented over a year ago. But if you were hoping t...
  • FREE! That’s Right, I’m Giving Away MILLIONS of FREE Microsoft eBooks again! Including: Windows 10, Office 365, Office 2016, Power BI, Azure, Windows 8.1, Office 2013, SharePoint 2016, SharePoint 2013, Dynamics CRM, PowerShell, Exchange Server, System Center, Cloud, SQL Server and more!
    FREE! That’s Right, I’m Giving Away MILLIONS of FREE Microsoft eBooks again! Including: Windows 10, Office 365, Office 2016, Power BI, A...
  • C program to Calculate Factorial of a Number Using ...
    #include<stdio.h> #include<conio.h> void main() { int a,f=1,i; clrscr(); printf("Factorial i : "); ...
  • 10 Best Free VPN Services Of 2016: Which One Shall I Choose?
    10 Best Free VPN Services Of 2016: Which One Shall I Choose?   Short Bytes: Due to restrictions and localization of different interne...
  • Evolution of Microsoft’s Windows OS from Windows 1.0 to Windows 10
    Windows 1.0 to 10: The changing face of Microsoft’s landmark Windows operating system Microsoft, the leader in software and opera...
  • Biggest Rivalries in Computing History
    Pepsi vs. Coke, Edison vs. Tesla, Star Wars vs. Star Trek, history is filled with famous rivalries, but few have matched the intensity and...
  • How Do I Clear My Clipboard History?
    The clipboard does not have a “history”, and unless you are using a third-party clipboard manager (more on that later), there are three qu...
  • How to Hide and UnHide Any Drive in Windows Using Command Prompt
    How to Hide Any Drive in Windows Using Command Prompt Method 1 of 2 Step 1: Type CMD in Start menu search area and hit Enter to la...
  • Master Python: Save over 95% on 50+ hours of training
    Master Python: Save over 95% on 50+ hours of training For prog...

Recent Posts

Text Widget

Pages

  • Home

Blog Archive

  • ►  2019 (2)
    • ►  May (1)
    • ►  April (1)
  • ►  2017 (7)
    • ►  July (1)
    • ►  April (3)
    • ►  March (3)
  • ►  2016 (50)
    • ►  October (1)
    • ►  September (4)
    • ►  July (2)
    • ►  June (6)
    • ►  April (2)
    • ►  March (5)
    • ►  February (28)
    • ►  January (2)
  • ▼  2015 (9)
    • ▼  August (9)
      • Command Line Argument C Program
      • C program to copy contents of one file to another ...
      • Google announces massive reorganization, becomes s...
      • Windows 10 vs. Windows 8.1 vs. Windows 7 Performance
      • Fingerprint scanners on Android phones are far les...
      • C program to Calculate Factorial of a Number Using...
      • FIND FACTORIAL OF A NUMBER USING RECURSION IN C PR...
      • Intel Core i7-6700K "Skylake" CPU Review
Powered by Blogger.

Text Widget

About Me

ntech
View my complete profile

Copyright © NTech | Powered by Blogger
Design by Flythemes | Blogger Theme by NewBloggerThemes.com