• 4 Haziran 2023 10:10

Sait ORHAN

Öğretmek için Öğrenin- Öğrenmek için Öğretin

Faktöriyel Hesaplama

BySait ORHAN

Eyl 10, 2011
#include <cstdlib>
#include <iostream>
#include <math.h>
using namespace std;

int main(void)
{
    double a=1, n, result=1;
    cout << “Faktoriyelini Almak Istediginiz Sayi: “;
    cin >> n;
    while (a <= n){
          result =result* a;
          a++;}
    cout << n << ” Sayisinin Faktoriyeli: ” << result << endl;
    system(“PAUSE”);
    return EXIT_SUCCESS;
}

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

This site uses Akismet to reduce spam. Learn how your comment data is processed.