问题 填空题

请补充main函数,该函数的功能是:打印出满足个位的数字、十位上的数字和百位上的数字都相等的所有二位数。 本题的结果为:111 222 333 444 555 666 777 888 999。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在 main函数的横线上填入所编写的若干表达式或语句。 试题程序: #include <stdio.h> main () { int g, s, b; clrscr {); for(g=1; g<10; g++)for (s=1; s<10; s++) for(b=l; b<10; b++) { if( 【1】 ) printf("%5d", 【2】 ); } }

答案

参考答案:[1] g==s&&s=b或者g==b&&s==b或者g==s&&g==b

解析:[2] g+s*10+b*100 填空1:变量g表示三位数的个位数字,变量s表示三位数的十位数字,变量b表示三位数的百位数字。注意,表示三个数字都相等时,不能写成“g==s==b”,而要写成“g==s&&s==b”或者“g==b&&s==b”或者“g==s&&g==b”。填空2:一个三位数等于百位数字乘以100加上十位数字乘以10,再加上个位数字。

填空题
完形填空
A man hired a taxi outside the airfield. The cab had a woolen carpet with  26 lace edges. On the glass partition that  27 the driver's seat was a copy of a famous painting. Its windows were all clean.The customer was very much  28 and said to the driver, “I've never seen a nicer  29 .”“Thank you for your praise.”the driver answered  30 .
“The car isn't mine,” said the driver. “It belongs to the company. I used to be a  31 of cabs. When they returned, all of them were as  32 as garbage cans with cigarette butts and rubbish  33 here and there. On the seats and door-handles could be found something  34 like peanut sauce or, chewing gum.Why so? I thought if the car itself were very clean the passengers would most  35 be considerate and refrain from littering.”
“So when I got a  36 to be a taxi-driver, I began  37 my idea into practice-to tidy and  38 the car. Now before a new passenger gets on my car, I'd make a cheek and be sure it is in good order.When my car  39 after a day's work, it always remains  40 .”
When doing a thing, one makes efforts and wants to see the result. To change others, one has to make twice the  41 but get half the result. To change oneself is the other way round-more fruit with less effort. One had better ask oneself why one makes  42 on others much more than on oneself.   43 you take enough care to do as best you can for other people's sake, your efforts will yield results, If you  44 the inner world of your own, examine yourself and wipe out the dust and dirt, instead of fixing your eyes on other people, you will find a cheerful  45 for yourself and create a pleasant environment for others.
小题1:
A.uglyB.excitingC.brilliant D.favorite
小题2:
A.separatedB.coveredC.protected D.prevented
小题3:
A.movedB.annoyedC.disappointed D.surprised
小题4:
A.seatB.carpetC.garage D.cab
小题5:
A.naturallyB.smilinglyC.hopefully D.firmly
小题6:
A.driverB.cleanerC.repairer D.customer
小题7:
A.attractiveB.pleasantC.dirty D.clean
小题8:
A.spreadB.extendedC.dotted D.1eft
小题9:
A.funnyB.busyC.sticky D.clumsy
小题10:
A.likelyB.willinglyC.extremely D.regularly
小题11:
A.permitB.1icenseC.certificate D.passport
小题12:
A.putB.takeC.makeD.get
小题13:
A.provideB.driveC.decorate D.describe
小题14:
A.speedsB.leavesC.arrives D.returns
小题15:
A.spotlessB.prettyC.bright D.dirty
小题16:
A.progressB.effortC.attempt D.trial
小题17:
A.suggestionsB.commentsC.demands D.decisions
小题18:
A.ThoughB.WhileC.As D.If
小题19:
A.look intoB.look forC.look up D.look through
小题20:
A.spiritB.moodC.mindD.sense