C++用指针构造回文#include#includevoid main(){ char a[20]={0},*p1,*p2; int i; couta; i=strlen(a); p1=&a[i-1]; p2=&a[i]; while(p1) { *p2++=*p1--; } cout
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/24 23:28:18
x)s~>eų:kyٰyϦ+g%甦<
j"h#XjZC 6V+QȴVH/-IlKrR45
m3u
cl#0*I(0TVP m4LWZlMR>N'%a ̯x 8W "H
<}B-G#Da~͐"*]D;[0PUP1Pd~qAb ؓ
C++用指针构造回文#include#includevoid main(){ char a[20]={0},*p1,*p2; int i; couta; i=strlen(a); p1=&a[i-1]; p2=&a[i]; while(p1) { *p2++=*p1--; } cout
C++用指针构造回文
#include
#include
void main()
{
char a[20]={0},*p1,*p2;
int i;
couta;
i=strlen(a);
p1=&a[i-1];
p2=&a[i];
while(p1)
{
*p2++=*p1--;
}
cout
C++用指针构造回文#include#includevoid main(){ char a[20]={0},*p1,*p2; int i; couta; i=strlen(a); p1=&a[i-1]; p2=&a[i]; while(p1) { *p2++=*p1--; } cout
while (p1 - a >= 0)
{
...
}
*p2 = '\0';
cout