Tugas PBO bilangan fibonacci

public class Java {

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();

}
}

By Roby