问题 填空题

以下程序用于判断 a、b、c 能否构成三角形,若能,输出 YES,否则输出 NO。当给 a、b、c 输入三角形三条边长时,确定 a、b、c 能构成三角形的条件是需同时满足三 个条件:a+b>c,a+c>b,b+c>a。请填空。main(){ float a,b,c;scanf("%f%f%f",&a,&b,&c);if(=_________)printf("YES\n"); /*a、b、c能构成三角形*/else printf("NO\n"); /*a、b、c 不能构成三角形*/}

答案

参考答案:(a+b>c)&&(a+c>b)&&(b+c>a)

解析:此题主要考核的是 if 语句的条件运算符及逻辑运算,逻辑“与”运算是指所有条件为“真”时结果 才为真,根据构成三角形的条件两边之和大于第三边得出上面的结果。

阅读理解

阅读理解。

     For those of you who where born in the year of the pig, good luck and much success! This is your year.

     When talking to a Westerner, however, you've got to be a little careful when you talk about pigs. Chinese

people view the pig as a smart and prosperous animal. Western ideas tend to be a little more negative.

     A pig in the West is seen as a dirty, lazy, and fat animal. If anyone ever called you a pig, you wouldn't be

smiling. When a person doesn't like someone, sometimes he will call that person a pig.

     If you ever meet a Westerner who was born in the year of the pig, don't say, "Oh, you're a pig!" Most

Westerners will be understanding. They will be sure that you made some kind of a mistake. However, don't

take any chances. You might just offend someone who does not share your positive ideas about pigs.

1. According to the passage we can see that Chinese people think of the pig as a ______ animal. [ ]

A. they worship pigs best of all

B. they consider pigs as bad animals

C. they aren't used to talking about pigs

D. they don't like the topic about pigs at all

2. According to the passage we can see that Chinese people think of the pig as a ______ animal. [ ]

A. clever

B. rich

C. good

D. all the above

3. A Westerner will call someone a pig if he ______ that man. [ ]

A. dislikes

B. is afraid of

C. looks up to

D. makes fun of

4. When you call a Westerner a pig, who was born in the year of the pig, most of them ______. [ ]

A. will be angry

B. will be very surprised

C. can forgive

D. may quarrel with you

5. From the passage we can conclude that ______. [ ]

A. different people have different ideas about the same thing

B. Westerners do not like pigs as much as the Chinese

C. in general, Westerners and the Chinese don't like pigs

D. all of the Chinese like pigs better than Westerners

单项选择题