皮皮学,免费搜题
登录
搜题
【简答题】
下列给定函数fun()的功能是:将长整型数中每一位上为偶数的数依次逆向取出,构成一个新数放在t中。高位在低位,低位在高位。例如当s中的数为25846513时,t中的数为6482。 请改正函数fun()中的错误,使它能得出正确的结果。 注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。 试题程序: include <stdio.h> include <conio.h> void fun(long S,long *t) { int d; long sl=l,i=1; *t=0; while(s/i>0) i=i*10; i=i/10; while(s>0) { d=s/i /*************found*************/ if(d%2!=0) { /*************found*************/ t=d*sl+t; sl*=l0; } S=S%i; i=i/10; } } main() { long S,t; clrscr(); printf('/nPlease enter S:'); scanf('%ld',&s); fun(S,&t); printf('The result is:%ld/n',t); }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】梁下部不伸入支座钢筋在什么位置断开( )
A.
距支座边0.05Ln
B.
距支座边0.5Ln
C.
支座边0.01Ln
D.
支座边0.1Ln
【判断题】网络层的协议ARP实现物理地址转换为IP地址的功能。
A.
正确
B.
错误
【简答题】Modern scientists have mad great development in building computers that can imitate logical thought. There are two schools of thought on artificial intelce(人工智能)。 Supporters of “Strong AI” consid...
【单选题】Computers have made a great difference _______ our everyday life.
A.
with
B.
of
C.
to
D.
for
【简答题】钢纸制的粉盒 的商品编码为( )
【单选题】食品超市里营业面积的50%-70%用来销售()
A.
日用品
B.
生鲜食品
C.
常温食品
D.
时尚用品
【单选题】Study the following abbreviated essay outline. Then choose the most appropriate concluding paragraph. When computing technology is making an ever-increasing impact on many aspects of the production a...
A.
Although, to some extent, computers have brought people great convenience in getting information, entertainment and contact with others, especially for those businessmen, for those youngsters, typically those teenagers who are not rational enough to control themselves, computers should not be allowed to intrude into their daily life.
B.
All in all, everything has two sides. Whether computers will do us good or harm all depend on how we use them.
C.
In conclusion, I strongly believe that using computer everyday brings more benefits than drawbacks to young children. The most important aspect depends on that the young children need proper guidance.
D.
To sum up, computers benefit young children a lot and also bring about some negative influence on children.
【单选题】广东乳源瑶族自治县的“过山瑶”长期过着居无定所的游耕生活,有“食尽一山过一山”迁徙不断的特点,因此被称为( )。
A.
红头瑶
B.
过山瑶
C.
排瑶
D.
白裤瑶
【简答题】Televisions, stereos, telephones, and computers have changed the way we spend our time and what we know about the world. Some of the changes brought about by these material possessions have improved o...
【单选题】梁下部不伸入支座钢筋在什么位置断开( )
A.
距支座边 0.05Ln
B.
距支座边 0.5Ln
C.
支座边 0.01Ln
D.
距支座边 0.1Ln
相关题目: