سورس فاکتوریل (++C)

جمعه 12 بهمن 1397
10:43
smartdevelop


#include
#include

using namespace std;
int main()
{
    cout << "********************************************************" << endl;
    cout << "             smartdevelop.ir" << endl;
    cout << "********************************************************" << endl;
    short n;
    cout << "adad ra vared konid : ";
    cin >> n;
    unsigned int result = 1;
    for (int fact = n;fact>0;fact--)
        result *= fact;
    cout << "\n factorial " << n << " mishe = " << result << endl;
    getch();
    return  0;
}

 

 از کتابخانه های  conio.h  و  iostream  استفاده کنید

سورس : دانلود

 

 

 

 

 

 

 

 

 

 

 

 

 


💬 نظرات کاربران
💬ثبت نام کاربران
💬ورود کاربران