Go to Design --> Edit Html and find these sentences. Now replace these sentences with your own welcome message. This templates is Bloggerized by Lasantha - Premiumbloggertemplates.com. Download this template and more premium blogger templates from Premiumbloggertemplates.com.

Jumat, 15 Juni 2012

PROGRAM FIBONACCI MENGGUNAKAN C++

Posted by Sovyan nurzaman On 01.05 No comments

Penulis melanjutkan ilmu komputer saling berbagi di semester 3 untuk kali ini program fibonacci menggunakan c++,dan programnya mangga:
program:
#include <iostream.h>
#include <conio.h>
#include <stdio.h>
int fibo(int n)
{
if(n==1)
    return(0);
else if(n==2)
    return(1);
else
    return (fibo(n-1)+fibo(n-2));
}
void main()
{
    int n;
    cout <<"Masukkan deret fibonacci : "; cin>>n;
    cout <<endl;
    for(int i=1;i<=n;i++)
    cout<<fibo(i)<<" ";
    cout<<endl;
    getch();
}
dan hasilnya:





Free Template Blogger collection template Hot Deals BERITA_wongANteng SEO theproperty-developer

0 komentar:

Posting Komentar