Skip to content

Instantly share code, notes, and snippets.

@peter279k

peter279k/JPA05.java

Created May 24, 2017
Embed
What would you like to do?
TQC+ JAVA
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
You can’t perform that action at this time.