C++ Programming Tutorial



 #include <iostream.h>
 #include    <conio.h>

  const long factorial(const long);

 int main( )
    clrscr( );

    int n;

    cout<<\"\\n Enter the number = \";

    cout<<\"\\n n! = \"<<n<<\"!\"<<\"  =  \"<<factorial(n)<<endl;

    getch( );
    return 0;

 //--------------------------  factorial( )  -----------------------------//

 const long factorial(const long n)
    long fn=1;


    return fn;

    Related Post:
  1. Program to add two integers of any length

  2. Program to illustrate the use of call-by-value method in functions

  3. Program of Binary Search Tree Operations

  4. Program to illustrate the implementation of Stack as an Arithmetic Expression Evaluater

  5. Program to draw a line using Bresenhams Line Algorithm (BLA) for lines with slopes negative and greater than 1

  6. Program to read a Linear System of Equations,then evaluate it by using Gauss-Elimination Method and show the result


  8. Program to get possible prime numbers like number 6158 contains the substrings 6, 1, 5, 8, 61, 15, 58, 615, 158, and 6158.Find the largest substring..

  9. Program to illustrate over-riding of base class member function in a derived class

  10. Program to illustrate the use of the break statement

  11. To parse a string using Operator Precedence parsing

  12. Program to print table of values of the function y = e raise to -x

  13. Program to illustrate the use of the continue statement

  14. Program that provides an example of call by value for functions

  15. Program to generate a pattern

  16. Program to illustrate the Insertion Sort

  17. Program to illustrate the use of call-by-refrence method using pointers

  18. Program to illustrate virtual function and Inheritance

  19. Program to read a Non-Linear equation in one variable, then evaluate it using Modified False-Position Method and display its kD accurate root

  20. Program to estimate the value of Second Derivative of the function at the given points from the given data using Central Difference Formula of order 2