试题与答案

以下程序的输出结果是______。 #include<stdio.h> main()

题型:填空题

题目:

以下程序的输出结果是______。 #include<stdio.h> main() {int x=27; while(x>20&&x<30) { x++; if(x/3){x++;break;} else continue; } printf("%d\n",x); }

答案:

参考答案:29

解析: 本题考查while循环和++运算,x=27符合循环条件,执行循环体中x++后,x=28,if条件也成立,执行x++后退出,x的值增1,结果x=29。

试题推荐
题型:阅读理解

阅读理解。

    

     Sitting on exercise balls brings more than a smile to students and teachers.

     Some fourth-graders at Conrad Weiser West Elementary School in Womelsdorf love their new

chairs--probably because they're not really chairs at all. The kids are sitting on the air-filled balls. But

different from those just for exercise, these have small legs that keep them from rolling. Sitting on a chair

all day in school can make anyone want to move around. So, more and more teachers are letting students

have a ball. By using exercise balls instead of common chairs, teachers find students' posture (姿势) and

attention improved.

     Dotti Pownall, a fifth-grader teacher in West Virginia, has been using balls as chairs since December

2008."The students love them." she says. Pownall took a survey of her students. She found that 80 percent,

thought sitting on the balls helped them concentrate (专注) better: "Besides, they're fun," says Pownall.

     According to WittFitt,  a company that has sold balls to more than 200 schools, they can improve kids'

posture and classroom behavior.

     Exercise ball chairs are getting popular in classrooms, from preschool to college. Some adults (成人)

even use them at work. Lisa Witt felt so strongly about the use of balls as chairs that she started WittFitt.

She said the company not only encourages the use of balls but also educates teachers and students on how

to use them."We sell balls in 24 states in America, three provinces in Canada and Japan." says Witt.

1. Sitting on exercise balls can ______.

A. improve students' attention

B. make students smarter

C. keep students moving around

D. help students become fit

2. According to the passage, the company WittFitt ______.

A. began to produce balls in 2008

B. sells balls in 24 countries

C. was set up by Lisa Witt

D. is famous around the world

3. It can be seen from the passage that ______.

A. exercise balls have no legs

B. Pownall works as a teacher

C. students hate exercise balls

D. exercise balls are filled with sand

4. The passage mainly tells us about ______.

A. the shape of exercise balls

B. the use of exercise balls

C. the number of exercise balls

D. the inventor of exercise balls

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