Created
May 24, 2017 18:49
-
-
Save peter279k/19ef2ea2e3cb76980f82c8da94a771e2 to your computer and use it in GitHub Desktop.
TQC+ JAVA
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
import java.util.Scanner; | |
public class JPA05 { | |
public static Scanner keyboard = new Scanner(System.in); | |
public static void main(String[] argv) { | |
int []num = new int[10]; | |
num[0] = 0; | |
num[1] = 1; | |
for(int index=2;index<10;index++) { | |
num[index] = num[index-1] + num[index-2]; | |
} | |
for(int index=0;index<num.length;index++) { | |
System.out.println(num[index]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment