皮皮学,免费搜题
登录
logo - 刷刷题
搜题
【单选题】
利用分解与抽象,如果我们想输出100遍*#*$*%,代码应该如何写更好?
A.
System.out.print(“*”); System.out.print(“#”); System.out.print(“*”); System.out.print(“$”); System.out.print(“*”); System.out.print(“%”); ...//省略98遍 System.out.print(“*”); System.out.print(“#”); System.out.print(“*”); System.out.print(“$”); System.out.print(“*”); System.out.print(“%”);
B.
void printOnce (){ System.out.print(“*”); System.out.print(“#”); System.out.print(“*”); System.out.print(“$”); System.out.print(“*”); System.out.print(“%”); } void printHundredTimes(){ for(int i=0;i<100;i++) printOnce (); }
C.
void   printSharp(){ System.out.print(“*”); System.out.print(“#”); } void   printDollar(){ System.out.print(“*”); System.out.print(“$”); } void   printPercentage(){ System.out.print(“*”); System.out.print(“%”); } void printOnce (){ printSharp(); printDollar(); printPercentage(); } void printHundredTimes(){ for(int i=0;i<100;i++) printOnce (); }
D.
void   printStar(){ System.out.print(“*”); } void   printSharp(){ printStar(); System.out.print(“#”); } void   printDollar(){ printStar(); System.out.print(“$”); } void   printPercentage(){ printStar(); System.out.print(“%”); } void printOnce (){ printSharp(); printDollar(); printPercentage(); } void printHundredTimes(){ for(int i=0;i<100;i++) printOnce (); }
手机使用
分享
复制链接
新浪微博
分享QQ
微信扫一扫
微信内点击右上角“…”即可分享
反馈
参考答案:
举一反三
【多选题】细菌在半固体培养基中的生长现象正确的是
A.
有鞭毛细菌只沿穿刺线生长
B.
无鞭毛细菌只沿穿刺线生长
C.
有鞭毛细菌沿穿刺线扩散呈毛刷状、云雾状
D.
无鞭毛细菌沿穿刺线扩散呈毛刷状、云雾状
E.
都呈扩散生长
【单选题】The American economy is still in trouble,________ the Chinese economy is beginning to pick up.
A.
when
B.
however
C.
while
D.
therefore
【单选题】If an economy’s GDP rises, then it must be the case that the economy’s
A.
income and expenditure both rise.
B.
income rises and saving falls.
C.
income and saving both rise.
D.
income rises and expenditure falls.
【简答题】用括号里的词的正确形式填空。 1. My grandpa is going to have her (90) birthday. 2. We are looking for a student (call)Tom. 3. While we (wait) for the bus , a girl (run) up to us. 4. - you ever (be) to Beijing? -Yes,...
【简答题】Passage 2 The number of executive branch employees retiring this fiscal year, which ends next month, is on track to be nearly twice the total who retired in 2009, according to government figures. And ...
【简答题】根据中文提示,用词组的适当形式填空,每空一词。 1. With the help of Mr. Chen, I have _______ (取得进步) in English. 2. When it rains or when the wind blows, the earth is _______ (带走). 3. We are _______ (应该) do everything we can ...
【简答题】fiscal year
【判断题】在半固体培养基中只沿着穿刺线生长者为有鞭毛能运动的细菌 。( )
A.
正确
B.
错误
【简答题】What is the Chinese meaning of annual report and financial! fiscal year? What are the three financial statements in a company's annual report?
【单选题】At the beginning of the fiscal year, interest rates climbed ______ 3. 2 percent, up half a point from the previous year.
A.
by
B.
in
C.
to
D.
on
相关题目:
参考解析:
知识点:
题目纠错 0
发布
创建自己的小题库 - 刷刷题