Sunday 1 January 2017

Program to calculate the factorial of an integer.

Share & Comment
CODE

#include <iostream.h>

#include <stdlib.h>

{              system (“CLS”) ;

                Int I , num , fact = 1 ;

                Cout << “/nEnter integer : “ ;

                Cin >> num ;

                I = num ;

                While (num)

{              fact * = num ;

-          - num  ;

}

                Cout << “ The factorial of “ << I ;

                         << “ is” << fact <<”\n” ;

Return 0 ;

Tags:

Written by

Hy, i am a Code Geek ! And like to eduate others.

0 comments:

Post a Comment

 
Copyright © C++ Programming | Designed by Templateism.com