Tugas II PBO contoh bilangan fibonacci

public class Ana_fibonacci {
public static void main(String[]args){
int a=1,b=1;
int n = 20; // input deret fibonacci
System.out.print(a+” “);
for (int i=1;i<n;i++){
System.out.print(a+” “);
a=a+b;
b=a-b;
}
System.out.println();
System.out.println(“by :Ana”);
System.out.println(“NIM : 00000000”);
System.out.println(“Alamat : BPI Blok f8 no. 4”);
}
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s