- import java.util.Scanner;
- public class JPD05 {
- public static Scanner keyboard = new Scanner(System.in);
-
- public static void main(String[] argv) {
-
-
- int data [] = new int [10];
- data[0] =0;
- data[1] =1;
-
- for(int i=2;i<data.length;i++)
- {
- data[i] = data[i-1]+data[i-2];
- }
-
- for(int i=0;i<data.length;i++)
- {
- System.out.println(data[i]);
- }
-
-
- }
- }
複製代碼 |