纠结了好长时间的问题,求解
import *;import javax.Swing.JOptionPane;
public class StudentScore{
public static void main(String[] args) throws IOException {
int k,count = 5;
double score[] =new double[count];
boolean contiGo = ture;
String str;
BufferedReader buf = new BufferedReader(
new class InputStreamReader(System,int ));
for(k=0;k<count;k++) {
while (contiGo){
System.out.print("请输入第"+(k+1)+"个学生的成绩:");
str =buf.readLine();
}
double[] scoreCopy = new double [count+1];
double temp = 0;
System.arraycopy(score,0,scoreCopy,1,score.length);
for(k=1;k<count;k++)
for(int m = 1;m<=count-k;m++)
if(scoreCopy[m]>scoreCopy[m+1]) {
temp=scoreCopy[m];
scoreCopy[m]=scoreCopy[m+1];
scoreCopy[m+1]=temp;
}
System.out.println("这"+score.length+"这个同学成绩如下:");
for(int j=0;j<score.length;j++){
System.out.print(score[j]+"\t");
}
System.out.println("\n这"+score.length+"个同学的成绩从低到高排序如下:");
for(int j=1;j<scoreCopy.length;j++){
System.out.print(scoreCopy[j]+"\t");
}
}
}
}
[附件]