题目内容

编写函数fun,其功能是:计算n门课程的平均分,结果作为函数值返回。 例如,若有5门课程的成绩是:90.5,72,80,61.5,55,则函数的值为71.80。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入你编写的若干语句。 试题程序: #include <stdio.h> float fun(float * a, int n) void main() float score[30]=90.5, 72, 80, 61.5, 55), aver; aver=fun(score, 5); printf("\nAverage score is:% 5.2f\n", aver);

查看答案
更多问题

When we think of green buildings, we tend to think of new ones—the kind of high-tech, solar-paneled masterpieces that make the covers of architecture magazines. But the U.S. has more than 100 million existing homes, and it would be (1) wasteful to tear them all down and (2) them with greener versions. An enormous amount of energy and resources went into the construction of those houses. And it would take an average of 65 years for the (3) carbon emissions from a new energy-efficient home to make up for the resources lost by destroying an old one. So in the broadest (4) , the greenest home is the one that has already been built. But at the same time, nearly half of U.S. carbon emissions come from heating, cooling and (5) our homes, offices and other buildings. "You can’t deal with climate change without dealing with existing buildings," says Richard Moe, the president of the National Trust.With some (6) , the oldest homes tend to be the least energy-efficient. Houses built before 1939 use about 50% more energy per square foot than those built after 2000, mainly due to the tiny cracks and gaps that (7) over time and let in more outside air.Fortunately, there are a (8) number of relatively simple changes that can green older homes, from (9) ones like Lincoln’s Cottage to your own postwar home. And efficiency upgrades (升级) can save more than just the earth; they can help (10) property owners from rising power costs.A.accommodationsB.clumsyC.doubtfulD.exceptionsE.expandF.historicG.incrediblyH.poweringI.protectJ.reducedK.replaceL.senseM.shiftedN.supplyingO.vast (3)处应填()

Who has got a pen How much does one shirt cost

A. $6.00.
B. $6.50.
C.$12.00.

Walking, if you do it vigorously enough, is the overall best exercise for regular physical activity. It requires no equipment, everyone knows how to do it and it carries the (1) risk of injury. The human body is designed to walk. You can walk in parks or along a river or in your neighborhood. To get (2) benefit from walking, aim for 45 minutes a day, an average of five days a week.Strength training is another important (3) of physical activity. Its purpose is to build and (4) bone and muscle mass, both of which shrink with age. In general, you will want to do strength training two or three days a week, (5) recovery days between sessions.Finally, flexibility and balance training are (6) important as the body ages. Aches and pains are high on the list of complaints in old age. The result of constant muscle tension and stiffness of joints, many of them are (7) , and simple flexibility training can (8) these by making muscles stronger and keeping joints lubricated (润滑). Some of this you do whenever you stretch. If you watch dogs and cats, you’ll get an idea of how natural it is. The general (9) is simple: whenever the body has been in one position for a while, it is good to (10) stretch it in an opposite position.A.allowingB.avoidableC.brieflyD.componentE.determinedF.helpingG.increasinglyH.lowestI.maintainJ.maximumK.preventL.principleM.provokeN.seriouslyO.topic (4)处应填()

The popular notion that older people need less sleep than younger adults is a myth, scientists said yesterday.While elderly people (1) to sleep for fewer hours than they did when they were younger, this has a(n) (2) effect on their brain’s performance and they would benefit from getting more, according to research.Sean Drummond, a psychiatrist (心理医生) at the University of California, San Diego, said that older people are more likely to suffer from broken sleep, while younger people are better at sleeping (3) straight through the night.More sleep in old age, however, is (4) with better health, and most older people would feel better and more (5) if they slept for longer periods, he said."The ability to sleep in one chunk (整块时间) overnight goes down as we age but the amount of sleep we need to (6) well does not change," Dr Drummond told the American Association for the Advancement of Science conference in San Diego."It’s (7) a myth that older people need less sleep. The more healthy an older adult is, the more they sleep like they did when they were (8) . Our data suggests that older adults would benefit from (9) to get as much sleep as they did in their 30s. That’s (10) from person to person, but the amount of sleep we had at 35 is probably the same amount as we need at 75."A.alertB.associateC.attractingD.clingE.continuingF.definitelyG.differentH.efficientlyI.formallyJ.functionK.mixedL.negativeM.sufficientN.tendO.younger (5)处应填()

答案查题题库