Notes

Sunday, December 23, 2012

Write a program to find the factorial of a number.

SCREENSHOTS

To Download The Files 

----ClickHere-----

CODES

Starts from Here ------->>
#include<iostream.h>
#include<conio.h>
 int factorial(int );
 void main()
  { int n;
    clrscr();
    cout<<"\nEnter: ";
    cin>>n;
    cout<<"\nFactorial of "<<n<<" is "<<factorial(n)<<".";
    getch();
  }
 int factorial(int n1)
  { int i,f=1;
    for(i=n1;i>=1;i--)
    {  f=f*i;}
    return (f);
  }

<<----------End Here
Posted by Unknown at 7:38 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: C++

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Categories

  • Accountancy (1)
  • Business Studies (3)
  • C (1)
  • C++ (6)
  • Class - XII (8)
  • Eclipse (2)
  • Economics (3)
  • English (1)
  • JAVA (2)

About Me

Unknown
View my complete profile

Top 5 Posts of the Week

Popular Posts(All Time)

  • POSTER
  • Essential Features or Characteristics Of Partnership
  • Define Management.
  • What is Economy?
  • Scarcity
  • Relation between Efficiency and Effectiveness
  • Write a program to find the reverse of an inputted number.
  • What is economics all about?
  • Write a program for matrix addition, subtraction and multiplication.
  • Efficiency vs Effectiveness

Blog Archive

  • ►  2013 (13)
    • ►  March (8)
    • ►  January (5)
  • ▼  2012 (6)
    • ▼  December (6)
      • Write a program for matrix addition, subtraction a...
      • Write a program to print the Fibonacci series.
      • Write a program to find the factorial of a number.
      • Write a program to find the sum of the digits of a...
      • Write a program to find the reverse of an inputted...
      • Write a program to check whether the number is pri...
Ethereal theme. Powered by Blogger.