Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区 » Java与OOP初步  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 (,;expected)问题
ddddddv





发贴: 18
积分: 0
于 2007-02-20 14:12 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
看了一篇关于这个问题的帖子,那个是忘了一个;号 我看过了 自己好象不是这原因,请各位大虾指点。初次写这个。

ublic class score {
public static void main(String[] args) {
int[] units={32,87,70,66,90,15,
21,88,93,75,52,30};
for(int i=0,j=1;i<units.length,j<units.length; ) {
if(units[i]>=units[j]) {
j++;
} else {
i++;
}
System.out.println("this is the high score"+units[i]);
}
for(int a=0,b=1;a<units.length,b<units.length; ) {
if(units[a]<=units[b]) {
b++;
}else {
a++;
}
System.out.println("this is the low score"+units[a]);
}
for(int c=0,d=0,e=0,f=0;c<units.length,d<units.length,
e<units.length,f<units.length;c++) {
if(units[c]>80) {
d++;
}else if (units[c]>60 && units[c]<=80) {
e++;
} else {
f++;
}
System.out.println("Good="+d+" "+"Ok="+e+" "+"Bad="+f);
}
for(int g=0,k=1;g<units.length,k<units.length;k++) {
units[g]+=units[k];
units[g]=units[g]/units.length;
System.out.println("the average score is"+units[g]);
}
System.out.println();
}
}




话题树型展开
人气 标题 作者 字数 发贴时间
7304 (,;expected)问题 ddddddv 1236 2007-02-20 14:12
5953 Re:(,;expected)问题 ddddddv 99 2007-02-20 19:50
6188 Re:(,;expected)问题 why 461 2007-02-22 08:53

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923