-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e5622ae
commit fe52443
Showing
1 changed file
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
|
||
} | ||
|
||
} | ||
|