public class Main { public static void main(String[] args) { for (int i = 1; i < 100; i++) { if (i % 2 == 0) // 填空 //i%2==0偶数项 System.out.println(i * i / 2); else// 奇数项 System.out.println((i * i - 1) / 2); } } }