题目内容

下列给定的程序中,函数fun()的功能是:计算并输出k以内最大的6个能被7或11整除的自然数之和。K的值由主函数传入,若k的值为500,则函数的值为2925。 请改正程序中的错误,使它能得到正确结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: #include<stdio.h> #include <conio.h> int fun(int k) { int m=0,mc=0,j; /*************found*************/ while(k>=2)&&(mc<6) { /*************found*************/ if((k%7=0)||(k%ll=0)) { /*************found**************/ m=k; mc++; } k--; } return m; } main() { clrscr(); printf("%d\n",fun(500)); }

查看答案
更多问题

Questions 11 to 15 are based on the following interview.

A. Family life of an artist.
B. The woman’s ambitions in her profession.
C. Something related to a music career.
D. What the critics have said about the vocalist.

溃疡病大出血的好发部位

A. 胃小弯或十二指肠后壁
B. 胃大弯
C. 胃小弯
D. 幽门附近,胃和十二指肠前壁
E. 胃窦部

Questions 1 to 5 are based on the following conversation.

A. Electrics. B. Smoke alarms.
B. C. The ceiling. D. Thomas’s wheelchair.

In some countries, societal and familial treatment of the elderly usually reflects a great degree of independence and individualism. 61) Their financial support is often provided by social security of welfare systems, which decrease dependence on their family. Additionally, older people may seek their own friends rather than become too emotionally dependent on their children. Senior citizens centers provide a means for peer-group association within one’s own age groups. There are problems, however, with growing old in the United States. 62) Glorification of youth and indifference to the aged have left many older people alienated and alone.Some families send their older relatives to nursing homes rather than integrate them into the homes of the children or grandchildren. This separation of the elderly from the young has contributed to the isolation of an increasingly large segment of society. 63) On the other hand, there are many older people who choose to live in retirement communities where they have the companionship of other older people and the convenience of many recreational and social activities close to home.The treatment of the elderly can be further understood by distinguishing between nuclear and extended family structures. In the United States the nuclear family, which consists of the father, the mother, and the children, is considered "the family". The extended family, common in other cultures, includes grandparents, aunts, uncles, cousins, nephews, nieces, and in-laws. The distinction between the nuclear and extended family is important because it suggests the extent of family ties and obligations. In extended families the children and parents have strong ties and obligations to relatives. It is common in these families to support older family members to have intensive contact with relatives, and to establish communal housing.The American nuclear family usually has its own separate residence and is economically independent of other family members. 64) Relatives are still considered "family" but are often outside the basic obligations that people have to their immediate families. When couples marry, they are expected to live independently of their parents and become "heads of households" when they have children. 65) It is not unusual in times of financial need for nuclear family members to borrow money from a bank rather than from relatives. Grandparents, aunts, uncles, and cousins, then, are not directly involved in the same way as they would be in an extended family structure. Relatives are still considered "family" but are often outside the basic obligations that people have to their immediate families.

答案查题题库