About

Wednesday, 18 January 2012

Program Mencari Faktorial

#include <iostream.h>
#include <conio.h>
main()
{
int x,n,jumlah=1;

cout<<"\t\tMENCARI FAKTORIAL\n";
cout<<"input angka = ";cin>>n;

for(x=n;x>=1;x--)
{
  jumlah=jumlah*x;
  cout<<endl<<x<<" deret factorial";
}

cout<<"\n\nJadi "<<n<<"! adalah = "<<jumlah;
getch();
}

Baca Juga Artikel dibawah ini :

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons