【计算机类职业资格】计算机二级JAVA-75及答案解析.doc

上传人:outsidejudge265 文档编号:1338367 上传时间:2019-10-17 格式:DOC 页数:4 大小:29.50KB
下载 相关 举报
【计算机类职业资格】计算机二级JAVA-75及答案解析.doc_第1页
第1页 / 共4页
【计算机类职业资格】计算机二级JAVA-75及答案解析.doc_第2页
第2页 / 共4页
【计算机类职业资格】计算机二级JAVA-75及答案解析.doc_第3页
第3页 / 共4页
【计算机类职业资格】计算机二级JAVA-75及答案解析.doc_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

1、计算机二级 JAVA-75及答案解析(总分:100.00,做题时间:90 分钟)一、基本操作题(总题数:3,分数:100.00)1.本程序中,不同类型的操作数间进行运算。其中,a 为字符型变量且值为“1“,b 为整型变量且值为7,c 为双精度浮点型变量且值为 7.9。程序中将 a与 b的求和后结果赋给 d,a 与 c的求和后结果赋给e,b 与 c的求和后结果赋给 f。 public class exam_85 public static void main(String args) char a=“1“; int b=7; double c=7.9; _d=a+b; _e=a+c; _f=b+

2、c; System.out.println(“d=“+d); System.out.println(“e=“+e); System.out.println(“f=“+f); (分数:30.00)_2.本程序中,不同类型的操作数间进行运算。其中,a 为字符型变量且值为“1“,b 为整型变量且值为7,c 为双精度浮点型变量且值为 7.9。程序中将 a与 b求和后结果赋给字符型变量 d,b 与 c求和后结果赋给整型变量 e,a 与 c求和后结果赋给字符型变量 f。 public class exam_86 public static void main(String args) char a=“1“

3、 int b=7; double c=7.9; char d=_(a+b); int e=_(b+c); char f=_(a+c); System.out.println(“d=“+d); System.out.println(“e=“+e); System.out.println(“f=“+f); (分数:30.00)_3.本程序中数组 arr中存储了学生的成绩,分别为 56、91、78、67、56、87、45、62、82、63,程序的功能是计算低于平均分的人数,并打印输出结果。请将程序空缺部分填写适当内容,使程序能正确运行。 public class exam_87 public st

4、atic void main(String args) int arr=56,91,78,67,56,87,45,62,82,63; int num=arr.length; int i=0; int sumScore=0; int sumNum=0; double average; while(inum) sumScore=sumScore+arri; _; average=_; i=0; do if(arriaverage) sumNum+; i+; while(_); System.out.println(“average:“+average+“,belows average:“+sumN

5、um); (分数:40.00)_计算机二级 JAVA-75答案解析(总分:100.00,做题时间:90 分钟)一、基本操作题(总题数:3,分数:100.00)1.本程序中,不同类型的操作数间进行运算。其中,a 为字符型变量且值为“1“,b 为整型变量且值为7,c 为双精度浮点型变量且值为 7.9。程序中将 a与 b的求和后结果赋给 d,a 与 c的求和后结果赋给e,b 与 c的求和后结果赋给 f。 public class exam_85 public static void main(String args) char a=“1“; int b=7; double c=7.9; _d=a+b

6、 _e=a+c; _f=b+c; System.out.println(“d=“+d); System.out.println(“e=“+e); System.out.println(“f=“+f); (分数:30.00)_正确答案:()解析:第 1处:int 第 2处:double 第 3处:double2.本程序中,不同类型的操作数间进行运算。其中,a 为字符型变量且值为“1“,b 为整型变量且值为7,c 为双精度浮点型变量且值为 7.9。程序中将 a与 b求和后结果赋给字符型变量 d,b 与 c求和后结果赋给整型变量 e,a 与 c求和后结果赋给字符型变量 f。 public clas

7、s exam_86 public static void main(String args) char a=“1“; int b=7; double c=7.9; char d=_(a+b); int e=_(b+c); char f=_(a+c); System.out.println(“d=“+d); System.out.println(“e=“+e); System.out.println(“f=“+f); (分数:30.00)_正确答案:()解析:第 1处:(char) 第 2处:(int) 第 3处:(char)3.本程序中数组 arr中存储了学生的成绩,分别为 56、91、78、

8、67、56、87、45、62、82、63,程序的功能是计算低于平均分的人数,并打印输出结果。请将程序空缺部分填写适当内容,使程序能正确运行。 public class exam_87 public static void main(String args) int arr=56,91,78,67,56,87,45,62,82,63; int num=arr.length; int i=0; int sumScore=0; int sumNum=0; double average; while(inum) sumScore=sumScore+arri; _; average=_; i=0; do if(arriaverage) sumNum+; i+; while(_); System.out.println(“average:“+average+“,belows average:“+sumNum); (分数:40.00)_正确答案:()解析:第 1处:i+(或 i=i+1或 i+=1) 第 2处:(double)sumScore/num 第 3处:inum

展开阅读全文
相关资源
猜你喜欢
  • GOST 14995-1969 Rectangular steel all-cast moulding boxes having inside dimensions length from 2400 to 3000 mm width from 1600 to 2000 mm height 700 800 mm Construction and dimensi.pdf GOST 14995-1969 Rectangular steel all-cast moulding boxes having inside dimensions length from 2400 to 3000 mm width from 1600 to 2000 mm height 700 800 mm Construction and dimensi.pdf
  • GOST 14996-1969 Rectangular iron all-cast moulding boxes with simplified wall profile having inside dimensions length from 400 to 500 mm width from 300 to 400 mm height from 75 to .pdf GOST 14996-1969 Rectangular iron all-cast moulding boxes with simplified wall profile having inside dimensions length from 400 to 500 mm width from 300 to 400 mm height from 75 to .pdf
  • GOST 14997-1969 Circular iron all-cast moulding boxes with simplified wall profile having inside diameter 400 500 mm height from 75 to 200 mm Construction and dimensions《圆形铁制全铸型箱 简.pdf GOST 14997-1969 Circular iron all-cast moulding boxes with simplified wall profile having inside diameter 400 500 mm height from 75 to 200 mm Construction and dimensions《圆形铁制全铸型箱 简.pdf
  • GOST 14998-1969 Rectangular iron all-cast moulding boxes having inside dimensions length from 400 to 500 mm width from 300 to 400 mm height from 100 to 200 mm Construction and dime.pdf GOST 14998-1969 Rectangular iron all-cast moulding boxes having inside dimensions length from 400 to 500 mm width from 300 to 400 mm height from 100 to 200 mm Construction and dime.pdf
  • GOST 14999-1969 Circular iron all-cast moulding boxes having inside diameter 400 500 mm height from 100 to 200 mm Construction and dimensions《净直径400 mm、500mm、高为100~200mm的整体铸铁圆形砂箱 结.pdf GOST 14999-1969 Circular iron all-cast moulding boxes having inside diameter 400 500 mm height from 100 to 200 mm Construction and dimensions《净直径400 mm、500mm、高为100~200mm的整体铸铁圆形砂箱 结.pdf
  • GOST 15 004-1988 System of products development and launching it into manufacture Personal safety means《产品的研制和投产的系统 单独防护设备》.pdf GOST 15 004-1988 System of products development and launching it into manufacture Personal safety means《产品的研制和投产的系统 单独防护设备》.pdf
  • GOST 15 007-1988 System of products development and launching into manufacture Products of light industry General《产品开发及投放生产体系 轻工业产品 概述》.pdf GOST 15 007-1988 System of products development and launching into manufacture Products of light industry General《产品开发及投放生产体系 轻工业产品 概述》.pdf
  • GOST 15 009-1991 System of product development and launching into manufacture Non-food consumer goods《产品开发及投放生产体系 非食品类生活消费品》.pdf GOST 15 009-1991 System of product development and launching into manufacture Non-food consumer goods《产品开发及投放生产体系 非食品类生活消费品》.pdf
  • GOST 15 015-1990 System of products development and launching into manufacture Bread and bakery products《产品的研制和投产的系统 面包和面包制品》.pdf GOST 15 015-1990 System of products development and launching into manufacture Bread and bakery products《产品的研制和投产的系统 面包和面包制品》.pdf
  • 相关搜索

    当前位置:首页 > 考试资料 > 职业资格

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1