The Code-Bin
Links
Home
Add your code!
All Listings
About
Latest Entry
Featured Scripts
Author's Website
Latest Entries
FFMPEG Thumbnail Scr...
PHP, 0.8KB
Jul. 29, 10:24pm
John
Z80 Assembler, 190 bytes
Feb. 17, 3:36am
John
Z80 Assembler, 176 bytes
Sep. 13, 2:19am
John
Z80 Assembler, 77 bytes
Sep. 13, 2:18am
John
Z80 Assembler, 209 bytes
Sep. 13, 2:17am
Fibo
Posted by: Joey | April 15, 2010 @ 4:47am
Java Code
[
Download
]
public class JoeyStairs { public static void main(String[] args) { fibMethod(); } public static void fibMethod() { for (int i = 0; i <= 12; i++) { int firstNumber = 0, secondNumber = 1; for (int k = 0; k < i; k++) { int thirdNumber = firstNumber; firstNumber = secondNumber; secondNumber = thirdNumber + secondNumber; } System.out.print(firstNumber + " "); } } }
Syntax Highlighting
[
Open in new window
]
Author Comments
example fibonacci implementation without using returns or recursion
Rating
4.56 / 8
61 Votes
http://codebin.yi.org/586
page generated in 0.00 seconds