下列给定程序中,函数fun()的功能是;求出两个数的最大公约数,并作为函数值返回。例如,若给num1和num2输入49和21,则输出的最大公约数为7:若给num1和num2分别输入27和81,则输出最大公约数为27。 请改正函数fun()中的错误,使它能得出正确的结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: #include <stdio.h> int fun(int a, int b) { int r,t; if(a<b) /******************found*****************/ { t=a; b=a; a=t;} r=a%b; while(r!=0) { a=b; b=r; r=a%b;} /******************found*****************/ return(a); } main() { int num1, num2, a; printf("Input num1 num2:"); scanf("%d %d",&num1, &num2); printf("num1=%d num2=%d\n\n",num1, num2); a=fun(num1, num2); printf("The maximun common divisor is %d\n\n", a); }
查看答案
某房地产开发公司拟以出让方式取得某宗地土地使用权,宗地条件如下:宗地面积4500m2,用途为商住综合楼,出让年限为50年,规划限制条件和设计方案为总建筑面积15600m2。其中,地下2层,地下的第二层1000m2为设备层;地下的第一层1000m2为停车场,设有汽车位60个。地上一至四层为商场,面积4000m2,五至十六层为住宅,面积9600m2,地上尚有车位50个。根据当地规定,交足40%地价款后即可开工,剩余地价款应在建筑物建成后一次性交清。 根据市场调查,有以下数据:该项目开发建没周期为2年,建成后住宅部分可一次性全部售完,其售价为5000元/m2,销售税费为售价9%;商场和车位用于出租,同类型、同档次商场日租金按可出租面积计算为5元/m2,可出租面积占总建筑面积的70%,每个汽车位租金为地下480元/月,地上400元/月,有关税费及经营管理费按租金的30%计。此类建筑物的建安综合成本分别为:商场及地下部分2500元/m2,住宅2000元/m2,地上车位平均为500元/个,专业费为建安综合成本的3%,假设资金投入方式为第一年60%,第二年40%。目前贷款年利率为8%,投资回报率为20%,土地还原率为7.5%,商场的房地产综合还原率为7%,建筑物还原率为8.5%。 试计算该开发公司开工时应交纳的地价款。
小学生的思维正处于______向______过渡阶段。
2010年9月26日11时35分,西安某电器厂一辆载有140箱共计105万发雷管的解放牌卡车沿309国道由西向东行驶至山东省平度市洪山乡乡政府所在地附近时,突然发生爆炸,造成5人死亡,95人受伤,其中6人重伤,爆点处地面形成一个直径约6m、深约1.9m的爆坑。爆炸冲击波对周围13个村庄造成不同程度的破坏,爆点附近公共建筑、民用住宅遭到严重破坏。距爆点以西240m的邮电局程控电话交换机因高压电线被炸断、烧毁,致使当地交通、通讯、供电中断,直接经济损失826万元。 根据以上场景,回答下列问题: 预防民用爆破器材燃烧爆炸事故应采取的主要措施有哪些
For more than 50 years, AT&T has been a proud supporter of the arts. In fact, over the past decade alone, AT&T: On Stage has sponsored more than 60 world premieres of new plays or musicals in the United States, Canada and United Kingdom. Today, that tradition of presenting exciting new work continues with the opening of not one, but two plays on two of the most respected stages in New York City. On February 8th, TEN UNKNOWNS, the new play by Jon Robin Baitz, begins performances at Lincoln Center Theater, On February 16th, LOBBY HERO, the new play by Kebbeth Lonergan, premieres at Playwrights Korizons. Two highly respected playwrights. Two highly anticipated plays. Two nights in the theater that got their start with help of AT&T: On Stage. Who will play the new play TEN UNKNOWNS on February 8th