返回列表 發帖
  1. import java.lang.System;
  2. import java.io.Console;
  3. public class Ch27
  4. {
  5.     public static void main(String args[])
  6.     {
  7.         int a=0,c=100;
  8.         while(c<=200)
  9.         {
  10.             a+=c;
  11.             c+=2;
  12.         }
  13.         System.out.println("100~200間所有的偶數和: "+a);
  14.     }
  15. }
複製代碼

TOP

返回列表