永远把艰辛的付出看作是生命的必要;
即使没有收获的指望,也心平气静地继续耕种!
90/100 C Programs(字符串倒置)
上一篇 /
下一篇 2008-04-07 12:23:53
/ 个人分类:C
/*【程序90】
LUPA开源社区(|!Dr[4i)u\.字符串倒置*/
.gV(_+tI%l!{G*J&D0#include "stdio.h"
LUPA开源社区zD]"f4Mh:Y/B#define M 5
m-xXk;t1d-Fsp{-O P0void main(void)
\9aPI2?Lj1J s#C0{
7C'e0n3In
KItw,w0 int a[M] = {1, 2, 3, 4, 5};
LUPA开源社区];@g m`faW.kp int i, j, t;
LUPA开源社区1Ho U9} Vs!w#YK i = 0;
gI!Wn%]XM0 j= M - 1;
$D'Nj&{h v0 while(i < j)
l2Y d+{,e#}chA
r7w0 {
'm3A"p6xXm6T#xE0 t = *(a + i);
"n
}2FT(Bj T#u;wy t0 *(a + i) = *(a + j);
RjPH0[bJO F0 *(a + j) = t;
1Po$q c
y L0 i++;
LUPA开源社区r+X3{.pbP)H?zE j--;
^ ~W$r YLO;mB0 }
LUPA开源社区AH$c!cc-nH for(i = 0; i < M; i++)
LUPA开源社区ihW"z:Fi`W\H printf("%d",*(a+i));
%t"Qu7J
z*F'i#s0}
LUPA开源社区*{9B1Y
S Ws$o6t\ }6I0O(k+f4EF'TQM0
导入论坛
收藏
分享给好友
管理
举报
TAG: