package com.Imtihon_1;
import java.util.Scanner;
public class Misol_3 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = in.nextInt();
int f1=0,f2=1,f3=1;
while (f2<=N){
f3=f1+f2;
f1=f2;
f2=f3;
System.out.println(f2);
}
}
}
Do'stlaringiz bilan baham: |