返回列表 發帖
  1. public class Ch01 {

  2.         public static void main(String[] args) {
  3.                 int i=100,total=0;
  4.                 while(i<=200)
  5.                 {
  6.                         total+=i;
  7.                         i+=2;
  8.                 }
  9.                 System.out.println("100~200偶數總和="+total);
  10.         }

  11. }
複製代碼

TOP

返回列表