IJUL'S BLOG

Mencari Faktorial pada C++

source code program faktorial pada c++;

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


void main()
{
    int n,i;
    float f;
    cout<< " Masukkan angka = ";
    cin >> n;
    f=1;
    for(i=1;i<=n;i++)
    {
        f=f*i;
    }
    cout <<" faktorialnya adalah ="  << f ;
    getch();
}

0 komentar:

Posting Komentar

Powered By Blogger
Diberdayakan oleh Blogger.

Entri Populer

PENGUNJUNG

Buku Tamu

About Me

Foto Saya
Ijal Ferdi
there is no something special about me,,, but this blog is so special for me......
View my complete profile

Total Tayangan Halaman

Followers