Refer to the following code fragment: The output is 13 / 5 = 2.0 The programmer intends the output to be 13 / 5 = 2.6 Which of the following replacements for the first line of code will not fix the problem?
A.
double answer = (double) 13 / 5;
B.
double answer = 13 / (double) 5;
C.
double answer = 13.0 / 5;
D.
double answer = (double) (13 / 5);
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【单选题】The deer has four _________. A. foot B. feet C. foots
【单选题】The deer has four _________. A. foot B. feet C. foots 2. Her two brothers are both _________. A. policeman B policemans C. policemen 3. There are four ___________ and two _________ in the...
【判断题】A physically mature female deer in good condition who has conceived in November and given birth to four fawns during the end of May or first part of June
【简答题】The deer has four _________.(foot) 2. Her two brothers are both _________(policeman). 3. There are four ___________ (Japanese) and two _________(German) in the group. 4. Can you see nine _________(hor...