皮皮学,免费搜题
登录
搜题
【单选题】
有一天,一位百万富翁遇到一个陌生人,陌生人找他谈一个换钱的计划,陌生人对百万富翁说:“我每天给你10万元,而你第一天只需给我1分钱,第二天我仍给你10万元,你给我2分钱,第三天我仍给你10万元,你给我4分钱……。你每天给我的一天的两倍,直到满一个月(30天)为止”,百万富翁很高兴,欣然接受了这个契约。请编程计算在这一个月中陌生人总计给百万富翁多少钱,百万富翁总计给陌生人多少钱。在空白处填写适当的表达式或语句,使程序完整并符合题目要求。#include intmain(){intj;doubletoStranger=0;/*富翁给陌生人的钱,以'元'为单位*/doubletoRichman=0;/*陌生人给富翁的钱,以'元'为单位*/doubleterm=0.01;/*富翁第一天给陌生人0.01元*/for(______;j<=30;j++){toRichman+=100000;/*陌生人每天给富翁10万元*/toStranger+=term;_________________;/*富翁每天给陌生人的一天的两倍*/}printf("toStranger:%fyuan\n",toStranger);printf("toRichman:%fyuan\n",toRichman);return0;}
A.
第9行:  j=1 第14行: term = term * 2
B.
第9行:  j=0 第14行: term = term * 2
C.
第9行:  j=1 第14行: toStranger = toStranger * 2
D.
第9行:  j=0 第14行: toStranger = toStranger * 2
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】Task 1 Directions: After reading the following passage, you will find 5 questions or unfinished statements, numbered 36 through 40. For each question or statement there are 4 choices marked A, B, C, a...
A.
speak out your own ideas actively
B.
keep silent and listen to others carefully
C.
appear uninterested in the meetings
D.
wait for your turn to speak
【简答题】Task 5 Directions: The following is a passage. After reading the passage you should give brief answers to the 5 questions (No.56 through No.60) following them. The Singapore underground train system, ...
【单选题】中国人民银行公布,自2008年3月25日起,上调存款类金融机构人民币存款准备金率0.5个百分点。 下列关于提高存款准备金率说法错误的是( )。
A.
提高存款准备金率是为了减少银行流动资金
B.
提高存款准备金率是国家对经济进行宏观调控的货币手段
C.
提高存款准备金率能够吸引公众更多的存款
D.
提高存款准备金率是银根紧缩政策
【简答题】Task 5 Directions: The following is a passage. After reading the passage you should give brief answers to the 5 questions (No.56 through No.60) following them. Dear Mr. Sampson, I want to thank you ve...
【单选题】Task 1 Directions: After reading the following passage, you will find 5 questions or unfinished statements, numbered 36 through 40. For each question or statement there are 4 choices marked A, B, C, a...
A.
a local hospital
B.
a medicine supplier
C.
a medical care system
D.
an insurance company
【简答题】Task 1 Directions: After rending the following passage, you will find 5 questions or unfinished statements, numbered 1 to 5. For each question or statement there are 4 choices marked A, B, C and D. Yo...
【简答题】( P57 )土地使用权
【简答题】Section B (5points, 1 points each) Directions: In this task, there is a passage with 5 questions (51 through 55). Read the passage carefully. Then answer the question in the fewest possible words. The...
【简答题】Task 1: Directions: After reading the following passage, you will find 5 questions or unfinished statements, numbered 36 to 40. For each question or statement there are 4 choices marked A, B, C and D....
【简答题】Task 5 Directions: The following is a passage. After reading the passage you should give brief answers to the 5 questions (No.56 through No.60) following them. Email 1 To: DBL Online From: Marsha Smit...
相关题目: