Source Code



Membuat Program Bilangan Fibonacci

  • Sulaeman Susanto
  • Jul 25' 13
  • C++
  • 83
  • 232
  • Indonesia

Membuat Program bilangan fibonacci

#include <iostream.h>
#include<conio.h>
main()
{
int x=1,y=1,p,i,a;
clrscr();
cout<<"----------------------------------------"<<endl;
cout<<"| Welcome to my program                |"<<endl;
cout<<"| Sulaeman Susanto                     |"<<endl;
cout<<"| IT Support Kominfo (SDPPI)           |"<<endl;
cout<<"| Support By Pasarkode.com             |"<<endl;
cout<<"----------------------------------------"<<endl;
cout<<"                                        "<<endl;
cout<<"Masukkan batas deret fibonacci : ";
cin>>a;
cout<<x<<" ";
cout<<y<<" ";
for(i=0;i<=a-3;i++)
{
p=x+y;
cout<<p<<" ";
x=y;
y=p;
}
getch();
return 0;
}
  • Tags :
comments powered by Disqus

Related Code

Program Bilangan Primer

Bilangan Faktorial

Program Segitiga Bintang

Program Bilangan Rata - Rata

Program menghitung bilangan urut

Membuat program Tahun Kabisat

Tips and Trick using jQuery

Send Email from PHP

Marquee in Delphi

Internet Connection Check



Category