Source Code C++ : Factorial

No Comments

Posted by Wahyu M. R Minggu, 06 Mei 2012 2 komentar
Update lagi :D
hohoh.
Kali ini Lab RPL ( www.rekayasa-perangkat-lunak.info ) akan membahas tentang Source Code C++ : Factorial .
Jadi misalnya begini ,
Ketika Kita Inputkan 4 maka ,
Outputnya Harus .
1 * 2 * 3 * 4 =  24 .
Download Source Code + Program yang sudah Jadi disini .

Lihat Source Codenya :

#include <iostream.h>
void main ()
{
 int x , faktorial = 1 ;
 cout<<" Faktorial "<<endl;
 cout<<"============================================================================="<<endl;
 cout<<"Masukan Bilangan : " ;
 cin>>x ;
for ( int c = 1 ; c <= x ; c++ )
{
if ( c == x )
{
cout<<c;
}
else
{
cout<<c<<" + " ;
}
faktorial = faktorial * c;
}
cout<<endl;
cout<<"Faktorial Dari "<<x<<" = "<<faktorial<<endl;
cout<<"\n\n\nCreated By Wahyu MR "<<endl;
cout<<"www.rekayasa-perangkat-lunak.info";
}

Atau Kalian bisa juga Download Source code + program yang sudah Jadi disini ( download )

Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.