1.兔子数列:1 1 2 3 5 8 13 21 34........,顺序为前面的两个位数字相加等于后面的第三位数字
public class tuz { public static void main(String[] args) { int j = 1,z = 1; for (int i = j;i<10;i++){ z = j-z; System.out.println(j); j = z+j; } }}
2.9*9乘法表
public class Ride { public static void main(String[] args) { for (int i = 9;i > 0;i--){ for (int j = 9;j > i-1;j--){ if (j*i<10){ System.out.print(i+"*"+j+"= "+(i*j)+" "); } else { System.out.print(i+"*"+j+"="+(i*j)+" "); } } System.out.println(); } }}