5编程题答案(5programmingquestionsanswer)

5编程题答案(5programmingquestionsanswer)

ID:42002339

大小:181.18 KB

页数:38页

时间:2019-09-06

5编程题答案(5programmingquestionsanswer)_第1页
5编程题答案(5programmingquestionsanswer)_第2页
5编程题答案(5programmingquestionsanswer)_第3页
5编程题答案(5programmingquestionsanswer)_第4页
5编程题答案(5programmingquestionsanswer)_第5页
资源描述:

《5编程题答案(5programmingquestionsanswer)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、5编程题答案(5programmingquestionsanswer)ProgrammingquestionsrefertotheanswerNote:someoftheanswersintheanswerareprovidedbytheoriginalquestionitself,andthereaderonlyneedstofilloutthepartsthatarenotprovided.1,voidfun(char*w,intm)/*cancallthefunlfunctioncharleft.{Int

2、i;For(i=0;i=lands[i]・s<=h)B[j]=a[i];J++;}}Returnj;}1,fun(STUa[],STU*s){Inti;*s=a[O];For(i=l;is)*s=a[i];1,voidfun(char*ss){Inti二1;While(ss[iT]andss[i]){

3、If(ss[i]>二'a'ss[i]〈二'z'ss[i]+='A'-'a');I+=2;}}2,floatfun(floath)Longi二h*1000;If(i%10<5)return(i/10)/100.0;Elsereturn(i/10+1)/100.0;}1,doublefun(doubleEPS){Doublei=l,a=l,b=l,c=l,s=0;While(c>二eps){S+二c;A*二i;B*二2*i+l;C=a/b;Returns*2;1,intfun(intscore[],intm,int

4、below[])Inti,j=0,s=0;For(i=0;i〈m;i++)s+二score[iS/二m;For(i=0;i

5、If(a[k]='*'!){A[i]=a[k];K++;A[i+1]二'';1,voidfun(char*a){Thefollowingcodeforreference*//*Char*p,*q;Intn二0;P二a;While(*p二二'*')statisticsonthenumberofhead/***n{n++;p++;}Q二a;Forward/*copythestringpleasefillinthecorrespondingstatementtocompleteitsfunction.Wh订e(*

6、p)*q++=*p++;(for;n>0;n--)attheendofthestringupn/***/*q++二'*,;*q二'‘;1,#includeVoidfun(char*a,intn){Thefollowingcodeforreference*//*Inti二0,J,k二0;While(a[k]二二'*')k++;/*k**statisticsthenumberofcharactersIf(k>n){I二n;j二k;Thefollowingcompletionofthesubsc

7、riptk/*totheendofthestringofcharactersforwardK-Nposition.Wh订e(a[j])a[i卄]=a[j++];A[i]二0;2,voidfun(intx,intpp[],int*n)Inti;*n二0;For(i=l;i〈二x;i+二2){If(x%i==0){Pp[*n]二i;(*n++);}}}1,voidfun(char*s,chart[])Inti二0,j=0;While(s[i]){If(i%2=0s[i]%2=0

8、

9、!){T[j]=s[i];J++;

10、}I++;}T[j]二0;1,voidfun(inta,intb,long*c)*cp/10*100+d%10+b/10*10+b%10*1000;2,doublefun(intn){Inti;Doubles=0;For(i=l;iint*、int>n>int>int){int

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。