27 Mart 2017 Pazartesi

QT FACTORIAL



// QT  FACTORIAL 

#include "factorial.h"
#include
#include 
#include 
#include
factorial::factorial()
{
    int num,factor=1;
    std::cout << "Enter Number To Find Its Factorial : \n";
    std::cin >> num;
    for(int a=1;a<=num ;a++)
    {
        factor = factor*a;
    }
    std::cout << "The Factorial of "<< num << "   =  "<< factor;


}



Share: