写了一个插入排序,有兴趣的同学可以看看。。。
for(int i=1;i!=scores.length;++i){
int j = i;
int key = scores[j];
while(j>=0&&scores[j-1]<key){
scores[i]=scores[j-1];
--j;
}
scores[j]=key;
}
for(int i=1;i!=scores.length;++i){
int j = i;
int key = scores[j];
while(j>=0&&scores[j-1]<key){
scores[i]=scores[j-1];
--j;
}
scores[j]=key;
}
for(score=53;score<60;score++){
count++;
}
System.out.println("加分后成绩:"+score);
System.out.println("共加了"+count+"次");
count++;
}
System.out.println("加分后成绩:"+score);
System.out.println("共加了"+count+"次");
回答楼下的问题
three%=one
three = three % one //three=0 one=10 题目已知
three = 0 % 10 // 0余除10等于0
three = 0
three%=one
three = three % one //three=0 one=10 题目已知
three = 0 % 10 // 0余除10等于0
three = 0
2015-01-23