Java- fibonacci;

Şubat 28, 2020 0 Yazar: alikperislam

package algoritma1;

import java.util.Scanner;

public class fibonacci {
public static void main(String[] args) {

    int a,b,c,i;
    a=1;
    b=2;


    for(i=0;i<50;i++) {

        c=a+b;
        if(i>=25) System.out.print(c +" ");
        a=b;
        b=c;
    }

    }

}