2007-04-08 15:43:11愛到星星人

我寫的程式

import java.io.*;

public class Main {



public static void main(String[] args) throws java.io.IOException{

Score student;
student = new Score();
student.Input01();
}



}
class Score{
private final int MAX =5;
void Input01()throws java.io.IOException{
int[] score1 = new int [MAX];

java.io.BufferedReader keyin;
keyin = new java.io.BufferedReader(
new java.io.InputStreamReader(System.in));
int x= 0,count=0;
do{
System.out.println(”請輸入五個分數,或輸入-1結束”);
x = Integer.parseInt(keyin.readLine());
score1[count++]=x;

if(count>=MAX){
x=-1;
System.out.println(”最多輸入”+MAX+”個分數”);
}
}while(x!=-1);
for (int i=0;i System.out.println(score1[i]);
}
}

}
隱姓埋名 2007-04-08 22:51:11

==什麼怪東西

版主回應
這是JAVA的程式 2007-04-09 21:53:39