输出各门课程的平均成绩输出等级表优、良、中、及格与不及格 输出各门课程各个等级的分布情况表

上传人:cl****1 文档编号:447828856 上传时间:2023-07-22 格式:DOCX 页数:8 大小:55.09KB
返回 下载 相关 举报
输出各门课程的平均成绩输出等级表优、良、中、及格与不及格 输出各门课程各个等级的分布情况表_第1页
第1页 / 共8页
输出各门课程的平均成绩输出等级表优、良、中、及格与不及格 输出各门课程各个等级的分布情况表_第2页
第2页 / 共8页
输出各门课程的平均成绩输出等级表优、良、中、及格与不及格 输出各门课程各个等级的分布情况表_第3页
第3页 / 共8页
输出各门课程的平均成绩输出等级表优、良、中、及格与不及格 输出各门课程各个等级的分布情况表_第4页
第4页 / 共8页
输出各门课程的平均成绩输出等级表优、良、中、及格与不及格 输出各门课程各个等级的分布情况表_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《输出各门课程的平均成绩输出等级表优、良、中、及格与不及格 输出各门课程各个等级的分布情况表》由会员分享,可在线阅读,更多相关《输出各门课程的平均成绩输出等级表优、良、中、及格与不及格 输出各门课程各个等级的分布情况表(8页珍藏版)》请在金锄头文库上搜索。

1、JAVA作业二 1、调试程序。疯了。5 package homework_2:日 import j ava. io. *;7 L import java.util. *:3 public class HoMevork-2 3 F public static void Jnaiii(String args) JSystem. out. p r intInC =Mo.1=):1 int i=100:2 System, out. prirrtln(i/8) :|3 Sy st em. out. print ln);Sy st eni. out. p r int In ( =No. 2=* );Hoj

2、nework_2 b=new Homework_2 ():if(b instanceof HomeworkS) System. out.printLnCis):elseSystem, o-ut.println( is not);Sy st em. out. printing ;System, out. println( =No. 3= ):String si = ill;2). int Value 0):16) intValue 0):10). intValue 0):Systent. out. println( 111 (2)= + Integer. valueQf (slSystem, o

3、ut. println( 111 (16)= + Integer. valueOf (sl5Sy st eni. out. print ln( 111 (10j = + Integer. valueOf (si,int k = 20:Syst em. out. print Ln (20 (10)的二进制表示:+ Integer. to-Strijig(kj 2);System, out. println(20(10)的 + 六诳制表示:+ Integer. toStrizig(ks 16):System. out. printLn():Systen. out. printLn( =Mo. 4”

4、):Vector v = new VectorObjectX):v. add( new String( Hello World ):v. add( new Integer( 10 );v. add( new Doublet 11.0):v. add( new Long( L2 );for (Iterator j = v. it erat or () ; j. hasMext () ;) (System, out. printLn( Vector elenent is: + j. next(): for ( Object o ; v ) System, out. print Ln ( Vecto

5、r elejnent is: + o ):Syst en. out. print Ln ():System. out. printLn( =Mo. 5=):String s = Java PlatformStandard, Edition L 5、 ls, latest, release, of the/、 Java Platform” :for(int f=0:fHI一雾5 6s9 0 12345689 012 3必心加)加)加)加82)加,瞧OOOOOOOOOOOCOOOOOOOOOOO100000001必心加)加)加)加)加)加8、心3戒源3 诱罚入体所猪的我(1-100):| ftns

6、 |package tobinary;public class ToBinary A public static void jntaiu(String: args) printBinsiry (256): print Binary (257): printBinary (1):-该方法将整型参数i以二诳制的形式输出,方法没有避回值*/static void printJBinary(int i) Sys-ten. out. print (i + 的2进制数表示为:t ): for (int j = 31: j = 0: j) if (1 j) & i) != 0) (Systmm. out.

7、print ( 1 ); else (System, out. print ( O ):Systeju. out. print Ln 0 ;/换行- IS 断点- To Bi nary (run) S9 任务,run.:,25 &的2W制急:去示为:药?的2连削敖表示为!I X的2注制敏成示为:成3生农:总时间三O功) -仿史记录旦 |q 歹EU:订乏巳|还m。二竺_三iitport javpublic class GuexxNuBber (public static void wain (Strinc arcs!) Iim i = 0;Strang str = null;irrt nun =

8、 (mt) (Math. rmdg() * 100) + 1:vhile (i - nun) str = JOptionPane. shovInputDi&iog(谓狗人(7所翁的劫 nun) JOptionPane. shovJCeSsageDi&iogCxuill,宙摘ffj敦丈大 了!,提示,H .Iif (i nun) (JOpt ionPane. shovJCessageDi&iogCxuill,体摘ST敦丈 1,提示 1J .Iif (1 = nun)(JOpticnPane. sh。桃 ss 非 eDzsicNnulL,坏,石对了!提示,1):,15 f s9 0 1234 56

9、8package arraytest:日 import java. util.public class Array!est A public static void main (St ring args) mt a = (13, 2, 30, 5, 34, 908,-5, 1200, 234, 9:for (mt i=0;ia. length; i+) System, out. println.( a +i+ = +ai): Arrays, sort (a):for (mt i=0:i a2=5a3=9a4=130 a5=3Oa=34a7=234aS=W8a9=1200成勃生成(总时 0秒)第二题优先级运算符结合性100-从左到右r!+(正)(负)*+-从右向

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 其它学术论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号