试题与答案

设有如下程序文件:    SET TALK OFF    CLEAR    DIME

题型:单项选择题

题目:

设有如下程序文件:    SET TALK OFF    CLEAR    DIMENSION a(2,3)    i=1     DO WHILE i<=2      j=1      DO WHILE j<=3        a(i,)=i+j        a(i,j)        j=j+1      ENDDO        i=i+1    ENDDO    SET TALK ON    RETURN  执行此程序,程序的运行结果为()。

A.2 3 43 4 5

B.1 2 33 4 5

C.1 2 32 4 6

D.2 3 44 5 6

答案:

参考答案:A

解析:该程序首先定义一个二维数组a(2,3),然后利用DO WHILE-ENDDO嵌套循环将每个数组元素赋值,即将该数组元素的行下标和列下标之和赋值给对应元素。

试题推荐
题型:单项选择题

Napoga is a 12-year-old girl in Ghana(加纳), Africa. It is hard for her family to get clean water. Every morning, she leaves home at half past five to get clean water for her family in a village far away. It takes her six hours to get enough clean water for daily cooking and drinking. She has no time to go to school or to play with her friends. Millions of people in the world are like Napoga. They can’t get enough clean water to keep healthy.
Earth Day is April 22. But on all other days, we must also remember it. The water we use is the most important natural resource on the earth.
Water covers 70% of the earth’s surface. But most of that is sea water. We can’t use it for very many things. Fresh water covers only 1% of the earth’s surface.
You probably feel lucky that your life isn’t as hard as Napoga’s. But that doesn’t mean you don’t have to worry about water. We all face serious water problems. One of them is water pollution. All kinds of things from cars, factories, farms and homes make our rivers, lakes, and oceans dirty. Polluted water is very bad for people to drink. And dirty water is bad for fish, too. Now, 34% of all kinds of fish are dying out.
How do cars and factories make our water dirty First, they pollute the air. Then, when it rains, the rain water comes down and makes our drinking water dirty. Dirty rain, called acid rain, is also bad for plants, animals and buildings.
Scientists say that in 30 years, more than half of the people in the world won’t have enough clean water. We have to learn how to save more water for ourselves and our children. Here is some advice for saving water:
· Turn off the water while you brush your teeth. You can save as much as 450 liters each month.
· Leaky taps waste a lot of water. Fix them right away!
· You can easily cut your 10-minute showers in half—and you’ll be just as clean.
· When you wash dishes, don’t let the water run.
· Only wash clothes when you have a lot to wash. If your washing machine isn’t full, you’re wasting water !

What’s the main idea of the passage

A.Something must be done to prevent water form being polluted.

B.Clean water means much to human beings and living things around us.

C.It’s time to take care of the water we use.

D.Water is the most important natural resource on the eart

查看答案
微信公众账号搜索答案