From fe52443c2d9ce19e985d105e0b145d3ce60e2ecf Mon Sep 17 00:00:00 2001 From: sandipan08 Date: Wed, 30 Sep 2020 23:55:42 +0530 Subject: [PATCH] Check 1st commit --- FiboNum.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/FiboNum.java b/FiboNum.java index cd75d7d..f68b9b1 100644 --- a/FiboNum.java +++ b/FiboNum.java @@ -1,10 +1,21 @@ import java.utill.*; class FiboNum{ - public static void main(String s[]){ - - } - Static int fibo(int n){ + public static void main(String s[]){ + Scanner sc=new Scanner(System.in); + int n,i,t1=0,t2=1,nextitem; + System.out.println("Enter the number u generate "); + n=sc.nextInt(); + + for(i=0;i<=n;i++) + { + System.out.println(t1); + nextitem=t1+t2; + t1=t2; + t2=nextitem; + } + } + }