Skip to content

Commit f623923

Browse files
initial commit
1 parent 107932f commit f623923

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

NAVEEN/src/Fibonacci.java

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
import static java.lang.System.out;
3+
/**
4+
* @author M.NAVEEN
5+
* RANDOM CODER'S
6+
* Tech/Project Lead Android Club
7+
*/
8+
public class Fibonacci {
9+
10+
public static void main(String[] args) {
11+
12+
int n1=0;
13+
int n2=1;
14+
int n3;
15+
out.print("[ "+n1+" , "+n2);
16+
for (int i=2;i<10;i++)
17+
{
18+
n3=n1+n2;
19+
out.print(" , "+n3);
20+
n1=n2;
21+
n2=n3;
22+
23+
}
24+
25+
out.print("]");
26+
27+
}
28+
29+
}
30+

0 commit comments

Comments
 (0)