close
import java.io.*;
public class question05 {
public static void main(String args[])throws IOException {
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
System.out.print("請輸入數字1(1~1500):");
int a=Integer.parseInt(buf.readLine());
System.out.print("請輸入數字2(1~1500):");
int b=Integer.parseInt(buf.readLine());
int sum=0;
if (a>b)
for (int i=b;i if (a for (int i=a;i System.out.println("總和為:"+sum);
}
}
全站熱搜
留言列表