搜档网
当前位置:搜档网 › 试题库 标注改错

试题库 标注改错

试题库 标注改错
试题库 标注改错

1.如图所示零件,改正图样上标注各项形位公差的错误,并说明理由。(不允许改变各项形位公差的特征符号)

答:(1)、基准A、B应与Ф1、Φ2尺寸线对齐;

(2)、圆柱度公差数值前不应加注Ф,且指引线不能与Ф3尺寸线对齐;

(3)、同轴度公差指引线应与Ф3尺寸线对齐;

(4)、平行度公差基准应为C;

(5)、圆度公差数值前不应加注Ф,且不能有基准A – B。

2.如图所示零件,改正图样上标注各项形位公差的错误,并说明理由。(不允许改变各项形位公差的特征符号)

答:(1)、基准A应与Ф1尺寸线对齐;

(2)、直线度公差数值前应加注Ф,且指引线应与Ф1尺寸线对齐;

(3)、垂直度公差数值前不应加注Ф,且应有基准A;

(4)、同轴度公差指引线应与Ф2尺寸线对齐;

(5)、圆柱度公差数值前不应加注Ф;

(6)、平行度公差基准应为B。

3.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

4.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

5.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

6.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

7.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

8.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

9.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

10.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

11.改正图示所示图样上形位公差标注中错误(在图上重新表示,形位公差项目不允许改变)。

12.改正图示所示图样上形位公差标注中错误(在图上重新表示,形位公差项目不允许改变)。13.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

14.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

15.改正图中各项形位公差标注上的错误(不得改变形位公差项目)。

16.指出图中标注中的错误,并加以改正。

计算机专业模拟试卷(程序填空和程序改错)

一、程序填空 1、有学生表ST,其中“编号”(N,2,0) 字段值从1开始连续排列。以下程序欲 按编号1,9,17,25……的规律抽取学 生参加比赛,并在屏幕上显示参赛学生 的编号,请填空。 USE ST DO WHILE NOT EOF() IF MOD__________ ??编号 ENDIF SKIP ENDDO 2、通过键盘输入读者的借书证号,在“读 者”表和“借阅”表中查找该读者及借 书的有关信息。 OPEN DATABASE BOOKS DO WHILE ___________ ACCEPT”请输入借书证号:” TO ZH SELECT * FROM 读者,借阅WHERE 读者.借书证号=借阅.借书证号AND ; 读者.借书证号=ZH WAIT“继续查询(Y/N)?”TO YN IF UPPER(Y/N)<>“Y” _______________________ ENDIF ENDDO _______________________ 3、将“借阅”表中借书日期超过一年且还 没有归还的记录的“标记”字段填充“*”。USE 借阅 DO WHILE _________ IF 还书日期={/} AND DA TE()—借书日期>365 REPLACE ___________ ENDIF SKIP ENDDO USE RETURN 4、一个自定义函数FX,计算F(X) =EX+3X+10的值,并编写一个主程序调 用FX函数,分别计算变量X由5到10 (步长为1)的函数值 *FX.PRG FOR I=5 TO 10 ?“X=”,I,“F(X)=”,_________ NEXT RETURN FUNCTION FX(X) ________________ RETURN F 5、下列程序根据输入的学生成绩,来判断 学生成绩等级,其中成绩大于或等于90分 的为优秀,75-90的为良好,60-74为及格, 小于60分的为不及格,请正确补充程序运 行。 Clear Set talk off ____________(“请输入成绩:”) to cj Do case Case cj<60 Dj=”不及格” Case cj<75 Dj=”及格” Case cj<90 Dj=”良好” ____________ Dj=”优秀” Endcase ? Dj Set talk on 6、设表STU.DBF中有“学号、姓名、性别、 出生日期、班级”等字段,程序完成根据姓 名进行的查询: Set talk off Use stu Store space(6) to xm Index on 学号to xh accept “输入姓名:” to xm locate for 姓名=xm display else ?“查无此人” Endif Wait “继续吗?”to yn If upper(yn)=”N” Exit Else Loop Endif Enddo Use Set talk off 7、请阅读下列判断一个自然数是否为质数 的程序,并将程序填空完整. Set talk off Input”请输入一个大于1的自然数:” to n K=0 &&K的值为0表示所输入的自然数是 质数, 为1表示不是质数 j=2 Do while j

短文改错练习题

短文改错 一、An eleven-year-old boy in a small town wanted to being a train driver. But the boy was born without arms. Because his father taught him to use his feet as“hands”.He couldn’t go to school, so he had to spend all his time watch trains coming and going because he lived near the station. And he wanted be train driver! One day he saw an empty train and climb in. It was not difficult for him to start it with his feet. Soon the train was traveling at forty mile an hour, and the workers there could do something to stop it. When he drove back to the town and stoped at the station, a worker got on it. He was very angry, but he laughed when the boy said, “I liked trains.”“Well ,I’m glad you don’t like planes!”the man says. 二、There is a library in our school. It is large and there is many books in it. Anyone may borrow books to it and it costs nothing to borrow them. Usually you may borrow as much as four books at a time. Books may be keep for two weeks. New story-books are always popular and some books, such as books for history, science , cooking is the most popular. So sometime when you go to the library to borrow a book, it may be out.What should you do? You can be ask the librarian to call you back later.The librarian will let you know when the book has been return and get it ready for you. You have to take careful of the books. If you lose the book, you will be trouble, and have to pay for it . 三、While Bill cleaning the classroom after school last Monday, his classmate, Lily, closed the door or locked it.She thought there was somebody in the classroom.Bill couldn’t get out of and had to stay in the classroom.Three hours ago, the teacher came and opened the door.She was surprised to see him there. On that time Bill was already very cold and hungrily. Now when Bill stays late in the classroom, she would put s a note on the door, “I’m still in the room. Don’t lock a classroom do or.” 四、The sea is very big. It cover three quarters of the earth. The sea is also very deep in some place. There is one place which the sea is about 11 kilometres deep. The highest mountain in the world is about 9 kilometres highly. If that mountain was put into the sea at that place, there would still be two more kilometer above it. In some parts of the sea, there is many kinds of fishes and plants.Some live near the top of the sea. Other live deep down. There are either a lot of small living things in the sea.A lots of fish live on eating them. 五、One day when Jack was walked in the park, he saw a woman sat in a chair with a dog beside hers.The dog was looking up at a woman.Jack walks up to the woman and said, “Hello, Sue,what are you? May I sit and say with you for a while?”“Of course, please to sit down.” Sue said.Jack s it down next to Sue in the chair but they talked quietly together. 六、When Peter was a boy, he likes watches and clocks very much. When he was eighteen years old, he began to teach him to mend watches. A lot of his friends brought him broken watches, and he mended it when he was free.One day, a policeman heared about this and brought him a watch and said,“My watch has stopped. Do you mend it to me, please?”Peter said, “Yes, sir. I can.” After few days, he brought the watch ba ck to the policeman.“How many should I give you?” the policeman asked.“Two dollars, sir.” Peter answered. Then he took out an small box out of his pocket and gave it for the policeman. “Here are the three wheels(轮子)from you watch.I didn’t find a place for them when I put everything back. 七、Several days before,I went out to have dinner with my father.We came to a restaurant and order two bowls noodles.We waited and watched as the people around us were all served theirs meals because they came later than us.We were very puzzling and a bit angry ,Finally,my father asked for the waitress passing by our table."I know you're all busy,"she said calmly,"so you don't mind that we send out a pizza,do you?''With these,the waitress smiled and went away .Our meals were in front of us five minute later. 八、Animals are use by the desert(沙漠)people in Many ways. They ate the meat, drink the milk of the animals.They use camels (骆驼) to carrying water,food, tent and other things.The people of the desert have to keep move from place to place.They must always watch for(留意)grass or desert plants for their animals. When there is more food for his animals,they move to an another place.The desert people is friendly.They would never refuse to help the people in trouble, but they would give them food and water. 九、Most families in China hoped their single children will have a happy future, so they are very strict in their children. So do teachers in schools! Many children are given so much homework that they have hardly any spare time have sports. The children are forbidden to do anything but to study. No wonder so many children are tiring of lessons. Some even attack or kill his parents and teachers! I believe many people already read this kind of news in newspapers or magazines. Shouldn’t we draw lesson from the accidents? Now our government is making out a plan to solve the education problems.

公文改错习题及答案

一.请修改下面的公文行政管理的懂得来、公文改错题应先找出错误,再进行修改,要重视所学公文写作知识的正确运用. 梁溪县卫生局《会议通知》 全县各食品加工行业: 根据上级关于对食品加工行业的卫生状况进行一次全面大检查的通知精神,决定召开我县食品加工卫生工作会议,部署卫生检查工作,现将有关事项通知如下: 一、会议时间:2009年10月25日至26日。10月24日下午两时至五时报到。 二、参加会议人员:全县各食品加工单位来一名负责人,各乡、镇及县工商联请派出一名代表列席会议。 三、住宿费回单位报销,伙食费个人自理,按有关财政规定给以补助。 梁溪县卫生局(公章) 2009年9月28日 1.标题:只用“会议通知”就好,去掉“梁溪县卫生局”和书名号。 2.正文第一行开头应该空两格 3.“关于对食品加工行业的卫生状况进行一次全面大检查的通知”这个感觉是一个文件的名称,加上书名号,变成《关于对食品加工行业的卫生状况进行一次全面大检查的通知》。 4."现将有关事项通知如下"单独列一行 5.报到日期应该单独拿出来列一项:报到日期:10月24日14:00—17:00 6.“参加会议人员”这一条写的太过口语化,公文要严谨, 可改成:二、与会人员:全县各食品加工单位负责人1名,各乡、镇及县工商联代表1名。 7.“三、住宿费回单位报销,伙食费个人自理,按有关财政规定给以补助。”也太口语化, 可改为:三、费用报销:伙食费个人自理,住宿费各相关单位按有关财政规定补助。 8.落款和时间格式不对,应该靠右。

二.修改下列文件标题 1.XX制药公司解决生产名中成药所需虎骨来源的请示 2.XX总公司组建XX实业公司的请示报告 3.XX公司对非法倒卖建筑材料的XXX开除公职的通知 4.XX公司关于开展春季运动会的决定的通知 5.XX总公司对所属单位学徒工转正后关于工资问题的规定 三.指出下列公文文稿的错误之处,并根据公文写作与处理的要求,改写为一份正确的公文. 请示 因工作需要,我县急需购买小轿车一辆,请批准调拨经费XXXXX元。 另:我县尚缺专业对口技术人员XX名,请在制定明年人员编制时一并考虑。 上述意见与要求如无不妥,请批复 此致 敬礼! XX县人民政府 xx县财政局 2008年9月6日 答案 一、1.××制药公司解决生产名贵中成药所需虎骨来源的请示 答:在“公司”后加“关于” 2.××总公司组建××实业公司的请示报告 答:在“公司”后加“关于”;删除“报告” 3.××公司对非法倒卖建筑材料的×××开除公职的通知 答:在“公司”后加“关于”;将“通知”改为“通报”,将介词“对”删去,移动“开除”一词到“对”的位置。修改后的标题为:××公司关于开除非法倒卖建筑材料的×××公职的通报 4. ×公司关于开展春季运动会的决定的通知 答:将“开展”改为“举办”,将“的决定”去掉,即:××公司关于举行春季运动会的通知

C语言程序改错及填空题

下列程序是建立一个包含学生有关数据的单向链表。但该程序有2个错误,错误出现在每个注释行附近,请调试改正。调试改正中,不得改变程序结构,也不得增删语句。 #define NULL 0 struct stud { long num; char name[10]; float score; struct stud *next; }; /* …………… comment …………… */ int n; struct stud create() 序中有两处错误代码,请改正.注意,不得改变程序结构。 #include <> main() { int a[8],*p=a; int i,j; int tempmin,tempcode; printf("\n input the numbers:\n"); for (i=0;i<8;i++) scanf("%d",p+i);

tempmin=*p; for (i=0;i<7;i++) { for (j=i;j<8;j++) if (j==i||*(p+j)

高考英语各地短文改错汇编试题与解析

(全文由Peter编制)2016年高考试题分项解析之专题----短文改错 1.【2016·全国新课标I】短文改错(10 分) My uncle is the owner of a restaurant close to that 1 live .Though not very big ,but the restaurant is popular in our area .It is always crowded with customers at meal times .Some people even had to wait outside My uncle tells me that the key to his success is honest. Every day he makes sure that fresh vegetables or high quality oil are using for cooking. My uncle says that he never dreams becoming rich in the short period of time. Instead, he hopes that our business will grow steady. 2.【2016·全国新课标II】短文改错(共10小题,每小题1分,满分10分) The summer holiday is coming. My classmates and I are talking about how to do during the holiday. We can chose between staying at home and take a trip. If we stay at home, it is comfortable but there is no need to spend money. But in that case, we will learn little about world. If we go on a trip abroad, we can broaden you view and gain knowledges we cannot get from books. Some classmates suggest we can go to places of interest nearby. I thought that it is a good idea. It does not cost many, yet we can still learn a lot. 3.【2016·全国新课标III】短文改错(共10小题;每小题1分,满分10分) The teenage year from 13 to 19 were the most difficult time for me . They were also the best and worse years in my life . At the first, I thought I knew everything and could make decisions by yourself. However, my parents didn’t seem to think such. They always tell me what to do and how to do it. At one time , I even felt my parents couldn’t understand me so I hoped I could be freely from them. I showed them I was independent by wear strange clothes. Now I am leaving home to college. At last, I will be on my own, but I still want to have my parents to turn to whenever need help. 4.【2016·四川】短文改错(共10小题;每小题1分,满分10分) It is Mother’s Day today.Though it’s a western festival, it’s popular in China now. Mom has a full-time job, so she has to do most of the houseworks. She is a great mother. Both Dad or I

公文改错方法及例题

1.公文改错题 关于办理商标注册附送证件问题的批复 《关于办理商标注册附送证件问题的请示》收悉,国务院大致同意关于办理商标变更、转让或者继展注册时不再附送原产标注册证的意见,但考虑此一问题涉及《商标法实施细则》的修改,特批复如下,盼遵照执行。 …… 本批复第一项、第四项由你局在1996年11月27日前发布。第三项、第四项由你局在一九九八年九月一日前发布。 1996年5月13日制发 (1)标题结构不完整。(2)生造文种。(3)多头主送。(4)请示平级。(5)一文数事。 (6)结尾不合作者本意,表达有误。(7)日期混汉字与阿拉伯数字。(8)请示未批准抄送下级。 2.请将下面错误的地方改正过来。(共10分) 关于你校设立新材料研究中心的请示 克格县职业学校: 你校克格职发[2003]9号《克格县职业学校关于设立新材料研究中心的请示》以及克职发[2003]15号文收悉,经研究讨论,兹批复如下: (一)不同意在你校设立新材料研究中心,其理由恕不详述。 (二)目前可在你校先行设立新材料研究室。 (三)拟原则同意在你校修建新材料检测实验楼,有关具体事宜待专门批复。专此函复。 克格县教育局 一九九八年五月三十日 (1)标题结构不规范。(2)标题内容叙述不清。(3)标题使用了没有检索价值的代称“你校”字样。(4)文稿在引述对方来文时不规范。(5)一文数事。(6)没有回答对方的全部问题。 (7)“拟原则同意”语意含混,“经研究讨论”中“讨论”二字多余,“专此函复”不能用做本文的结语。 (一)根据公文内容拟写标题。 1.某市劳动局为了加强对城镇待业人员的管理,进一步做好劳动就业工作,经市人民政府同意,决定对全市城镇待业人员统一进行登记,为此,行文告知全市各级劳动管理部门及有关单位。 2.某市人民政府就开展国有资产核定工作向所属下级机关行文,陈述该项工作的必要性,交代具体的工作任务及时间安排,并针对有关的步骤方法、政策界限、注意事项、报告方式与期限等提出具体要求。 (二)按照公文写作要求、修改下列语句中的错误。 3.早晨五六点钟,以通往机场的大街两旁已经站满了数万名欢送的人群。 4.从上述事实中,证明了他们的行动是正确的。 5.为了尽快地发展教育事业,应该大力提高教育的业务水平和培养新生力量。 6.经过一系列的整顿之后,第一车间劳动纪律逐渐走上正轨。 7.他们胸怀祖国,放眼世界,大力发扬了敢拼敢搏,终于夺取了冠军。 答案 1.某市劳动局关于对城镇待业人员统一登记的通知。 2.某市人民政府关于开展国有资产核定工作的指示(或通知)。 3.早晨五六点钟,在通往机场的大街两旁已经站满了数万名欢送的群众。 4.上述事实证明了他们的行动是正确的。

最新二级C语言考试题库及答案程序改错专项练习 精华版

1 / 4 程序改错题(共15题) 1、在考生文件夹下,给定程序MODI.C 的功能是: 求一维数组a 中所有元素的平均值,结果保留两位小数。 例如,当一维数组a 中的元素为:10,4,2,7,3,12,5,34,5,9 程序的输出应为:The aver is: 9.10 。 #include #include void main() { int a[10]={10,4,2,7,3,12,5,34,5,9},i; int aver,s; s = 0; for ( i=1; i<10; i++) s += a[i]; aver = s / i; printf("The aver is: %.2f\n", aver); } 2、在考生文件夹下,给定程序MODI.C 的功能是: 求二维数组a 中的最大值和最小值。 例如,当二维数组a 中的元素为: 4 4 34 37 3 12 5 6 5 程序的输出应为:The max is: 37 The min is: 3 。 #include #include void main() { int a[3][3]={4,4,34,37,3,12,5,6,5},i,j,max,min; max = min = a[0][0]; for ( i=0; i<3; i++) for ( j=1; j<3; j++) { if ( max < a[i][j] ) max = a[i][j]; /************found************/ if (min < a[i][j]) min = a[i][j]; } printf("The max is: %d\n", max); printf("The min is: %d\n", min); } 3、在考生文件夹下,给定程序MODI.C 的功能是: 求一维数组a 中的最大元素及其下标。 例如,当一维数组a 中的元素为:1,4,2,7,3,12,5,34,5,9, 程序的输出应为:The max is: 34,pos is: 7 。 #include #include void main() { int a[10]={1,4,2,7,3,12,5,34,5,9},i,max,pos; max = a[0]; pos = 0; for ( i=1; i<10; i++) /************found************/ if (max > a[i]) { max = a[i]; /************found************/ i = pos; } printf("The max is: %d ,pos is: %d\n", max , pos); } 4、在考生文件夹下,给定程序MODI.C 的功能是: 求二维数组a 中的最小值。 例如,当二维数组a 中的元素为: 4 2 34 7 3 12 5 6 5 程序的输出应为:The min is: 2 。 #include #include void main() { int a[3][3]={4,2,34,7,3,12,5,6,5},i,j,min; min = a[0][0]; for ( i=1; i<3; i++) for ( j=0; j<3; j++) if (min > a[i][j]) { /************found************/ min == a[i][j]; } printf("The min is: %d\n", min); }

短文改错题型精选100题

短文改错题型精选100题 1.假定英语课上老师要求同桌之间交换修改作文,请你修改你同桌写的以下作文.文中共有10处 语言错误,每句中最多有两处.每处错误仅涉及一个单词的增加、删除或修改. 增加:在缺词处加一个漏字符号(∧),并在其下面写出该加的词. 删除:把多余的词用斜线(\)划掉. 修改:在错的词下划一横线,并在该词下面写出修改后的词. 注意:1.每处错误及其修改均仅限一词; 2.只允许修改10处,多者(从第11处起)不计分. With the College Entrance Exam known as Gaokao approaching, a year activity named "Come on Grade Three" was held in the afternoon of May 30th. All the teachers and students including Grade O ne and us Grade Two participate in the event. The principal, one teacher and one student were made three wonderful and inspiring speech. After that all the teachers and students sang songs together but we all had a great time. This kind of activity is great way for Grade Three students to dealing with study pressure. They ca n reduce the pressure of study and get relaxing and refreshed. With less pressure, I think we will do better in Gaokao. 2.假定英语课上老师要求同桌之间交换修改作文,请你修改你同桌写的以下作文.文中共有10处 语言错误,每句中最多有两处.每处错误仅涉及一个单词的增加、删除或修改. 增加:在缺词处加一个漏字符号(∧),并在其下面写出该加的词. 删除:把多余的词用斜线(\)划掉. 修改:在错词下划一横线,并在该词下面写出修改后的词. 注意:1.每处错误及其修改均仅限一词; 2.只允许修改10处,多者(从第11处起)不计分. This morning, when I was walking in the street, I saw two traveler were reading a map, looked pu zzled. It seemed that we were lost. I went up them and asked how I could help. They told me that t hey were looking for the Temple of Heaven. I lead them to a nearby bus stop and advised them to tak e Bus No. 20, that could take them there directly. They appreciated my help great. Before long , the bus pulled out They got on a bus and waved goodbye to me. Seeing them on the bus, and I fe lt a kind of satisfaction. 3.假定英语课上老师要求同桌之间交换修改作文,请你修改你同桌写的以下作文.文中共有10处 语言错误,每句中最多有两处.每处错误仅涉及一个单词的增加、删除或修改. 増加:在缺词处加一个漏字符号),并在其下面写出该加的词. 删除:把多余的词用斜线划掉 修改:在错的词下画一横线,并在该词下面写出修改后的词. 注意:1.每处错误及其修改均仅限一词; 2.只允许修改10处,多者(从第11处起)不计分 Today I am talking to my dad Matthew, my hero. The reason why I admire him is because he starts every day with smile. And his smile always brings happy to my families. He has been looked after us carefully since many years ago. When discouraging by the difficulties, we often hav e dad with us, encouraging us not to give it up. What's more, he real does care and show his love t

2012计算机国二C语言等级考试题库(内部资料)程序改错

1.给定程序MODI1.C中函数fun的功能是:根据以下公式求π值,并作为函数值返回。例如,给指定精度的变量eps输入0.0005时,应当输出Pi=30140578.。(1)“t=0;”改为“t=1;”。(2)改成“return(2*s);” 2.给定程序MODI1.C中函数fun的功能是:将长整型中每一位上为偶数的数依次取出,构成一个新数放在t中。高位仍在高位,低位仍在低位。例如:当s中的数为:7654321时,t中的数为:7531。(1)“void fun (long s, long *t)”(2)“sl = sl*10;” 3.给定程序MODI1.C中函数fun的功能是:用下面的公式求π的近似值,知道最后一项的近似值小于指定数(参数num)为止:例如程序0.0001,则程序输出 3.1414。(1) “while(t>=num)”改为 “while(fabs(t)>=num) ”。(2)“t=s%n;”改为 “t=s/n;”。 4.给定程序MODI1.C中函 数fun的功能是:把主函 数中输入的三个数,最大 的放在a中,最小的放在 c中,中间的放在b中。 例如a=55.0 b=34.0 c=12.0。(1)“float k;”。 (2)“if(*a<*c)”。 5. 给定程序MODI1.C中 函数fun的功能是:为一 个偶数寻找两个素数,这 两个素数之和等于该偶 数,并将这两个素数通过 形参指针传回主函数。(1) “y=1;”。(2)“d=a-i;”。 6. 给定程序MODI1.C中 函数fun的功能是:由形 参给定n个实数,输出平 均值以上(含平均值)的 实数个数。所的平均值为: 195.838745,在平均值以 上的实数个数应为:5。(1) “int j, c=0; double xa=0.0;”。(2)“if (x[j]>=xa)”。 7.例如:当s中的数为: 7654321时,t中的数为: 7531。(1)“*t=0;”(2) “if(d%2!=0)” 8.函数功能是:求出 以下分数序列的前n项 和。 2/1,3/2,5/3,8/5/13/ 8,21/13,…...。和值 通过函数值返回到 main函数。例如,n=5, 则应输出:8.391667。 (1)“fun(int n)”改为 “double fun(int n)”。 (2)“b+=c;”改为“b=c;”。 9.函数fun的功能是: 判断一个整数是否是 素数,若是返回1,否 则返回0。(1)“k++” 改为“k++;”(2) “if(m=k)”改为 “if(m==k)” 10.给定程序MODI1.C 中函数fun的功能是: 从整数1到55之间,选 出能被3整除、且有一 位上的数是5的那些 事,并且把这些数放 在b所指的数组中,这 些数作为函数值返回。 规定,函数中a1放个 位数,a2放十位数。 (1)“a2=k/10;”。(2) “return i;”。 11.给定程序MODI1.C 中函数fun的功能是: 计算小于形参k的最大 的10个能被13或17整 除的自然数之和。K的 值由主函数传入,若K 的值为500.则主函数 为4622。(1) “if((k%13==0)||(k%17 ==0))”。(2)“______” 填“}”。 12.已知一个数列从第 0项开始的前三项分别 是0、0、1以后的各项 都是它相邻的前三项 之和。给定程序 MODI1.C中函数fun的 功能是:计算并输出该 数列前n项的平方根之 和。n的值通过形参传 入。(1)“double fun(int n)”。(2)“return sum;”。 13.函数fun的功能是: 根据整形形参m的值: 计算如下公式的 值……例如:若m中的 值为5,则应输出: 0.536389。(1) “for(i=2; i<=m; i++)”(2) “y-=1.0/(i*i);”。 14.函数的功能是:将 字符串中的字符按逆 序输出,但不改变字符 串中的内容。例如字符 串abcd,则应输出dcba。 (1)“void fun(char *a)”。(2)“printf("%c", *a);”。 15.函数fun的功能是:求 三个数的最小公倍数。 X1=15 x2=11 x3=2(1) 改成“int fun(int x, int y, int z )”。(2)return j 16.函数fun的功能是:根 据整型形参m计算如下 公式的值。若主函数中输 入5,则应输出-0.283333。 (1)“t=t-1.0/i;”。 (2)填空“return t;” 17. 例如,若输入:edcba, 则应输出:abcde。(1) “for( i=strlen( t )-1; i; i- - )” (2)“if(t[j]>t[j+1])” 18.函数fun的功能是: 根据形参m的值 (2<=m<=9),在m行m 列的二维数组中存放 如下所示规律的数据, 由main函数输出。(1) “void fun(int a[][M], int m)”。(2) “a[j][k]=(k+1)*(j+1);”。 19.函数fun的功能是: 先从键盘上输入一个3 行3列矩阵的各个元素

VB程序设计例题-程序改错程序填空程序设计

'以下程序段用于输出杨辉三角:结果样式如图1 ' Private Sub Form_Click() Const n = 10 Dim arr(n, n) As Integer For I = 1 To n arr(I, I) = 1 '**********SPACE********** 【arr(I, 1) = 1】 Next I For I = 3 To n For j = 2 To I - 1 '**********SPACE********** arr(i, j) =arr(i-1,j-1)+arr(i-1,j) Next j Next I For I = 1 To n For j = 1 To I '**********SPACE********** 【print arr(I,j)】 Next j Print Next I End Sub Option Explicit '------------------------------------------------ '【程序改错】 '------------------------------------------------ '题目:用自定义函数的方法求sum(x),求当-1≤x≤1时,' sum(x)=x/2!+x^2/3!+x^3/4!+……+x^n/(n+1)!, ' 当x〉1或x〈-1时,函数值为0。当n〈=0时,输入数' 据错误。X、N都是由用户输入。 '------------------------------------------------ '注意:不可增加或删除程序行,也不可以更改程序结构 '------------------------------------------------ Private Sub Command1_Click() Dim s As Single Dim n As Integer, x As Single, k As Integer n = Val(InputBox("Please input a integer value:"))

相关主题