Skip to content

Instantly share code, notes, and snippets.

@peter279k
Created May 24, 2017 18:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peter279k/19ef2ea2e3cb76980f82c8da94a771e2 to your computer and use it in GitHub Desktop.
Save peter279k/19ef2ea2e3cb76980f82c8da94a771e2 to your computer and use it in GitHub Desktop.
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