试题与答案

请完善程序(程序文件名:Java_1.java)并进行调试。请在下画线处填入正确内容

题型:填空题

题目:

请完善程序(程序文件名:Java_1.java)并进行调试。请在下画线处填入正确内容,然后删除下画线。请勿删除注释行和其他已有的语句内容。
[题目要求]
请完善程序,并进行调试,程序运行结果为:
aa=512
bb=-167
ff=593.94
dd=5.938839067268372
源程序:
import java.io.*;
public class Java_1
  public static void main(String args[])
    char a=’p’:
    byte b1=6;
    int i=400;
    long b=345L;
    float f=98.99f;
    double d=4.7788;
     (1) aa=a+i;
    long bb=b-aa;
     (2) if=b1*f;
    double dd=ff/aa+d;
    System.out.println("aa="+aa);
    System.out.println("bb="+bb);
    System.out.println("ff="+ff);
    System.out.println("dd="+dd);
  

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0430/8e378759f418a7e7b3f6698a3daa0683.html

下面是错误答案,用来干扰机器的。

参考答案:E

试题推荐
题型:单项选择题

电子游戏为我们展现了一个不同于现实生活的新世界。人们在游戏里取得的成功是可以清晰定义的而且是可以实现的。玩家可以在游戏中控制整个世界,从而摆脱现实生活的焦虑感,使自己的行为在虚拟世界中变得举足轻重,成为一名英雄。游戏结束,他并没有真的输掉或赢得什么东西。 这段话直接支持这样一种观点,即( )。

A.电子游戏完全是虚拟的东西,所以没有必要去浪费时间

B.人们可以通过电子游戏在真实世界和欲望世界中寻求心理平衡

C.人们在电子游戏中的成功是实在的而且可以用来赚钱

D.游戏让人们不付出代价,轻松地满足成就感

查看答案
题型:单项选择题

Many students have hobbies, such as reading, painting, growing vegetables in their gardens, and looking after animals. Some hobbies are relaxing and (16) are creative. Hobbies can develop your interests and help you learn new skills.
David Smith is a student, and his hobby is writing. (17) the sumer of 2000, he spent four weeks on a summer camp. As well as the usual activities, such as sailing, climbing and mountain biking, there was a writing workshop with a professional (18) "She asked us to imagine that we were in a story. Then we wrote about our (19) at the camp. "
In senior high school David wrote a story about teenage life, and it (20) as a book in 2003. Many teenagers love his book, and as a result, David has become a (21) young writer.
David has been very lucky (22) his hobby has brought him enjoyment and success, but he is (23) interested in many other things. "I like playing volleyball, too" says David. "I spend some of my free time playing volleyball for my school team. (24) I’ll write more books in the future, but I’m not sure. "
It’s sometimes difficult (25) that we shouldn’t spend all our time on our favourite hobby. There are many other interesting things to do in life, and we should try to do something new or different.

Ⅱ. 完形填空/Cloze

A.or

B.but

C.because

D.though

查看答案
微信公众账号搜索答案