主题:好
#include <stdio.h>
int main (void)
{
char marr[128]={0};
char *p = NULL;
int j = 0;
char p1 = 0;
int i = 0;
printf("请输入字符串:\n");
scanf ("%s",marr);
p = marr;
while (*p != '\0')
{
j++;
p++;
}
p = marr;
while (*p != '\0')
{
p1 = marr[i];
i = i + 2;
if (i > j)break;
printf ("%c\n",p1);
p++;
}
printf ("你输入的字符总长数是:%d\n",j);
return 0;
}
我想倒着不断减2要改哪里啊?? 例xiaobinbin
int main (void)
{
char marr[128]={0};
char *p = NULL;
int j = 0;
char p1 = 0;
int i = 0;
printf("请输入字符串:\n");
scanf ("%s",marr);
p = marr;
while (*p != '\0')
{
j++;
p++;
}
p = marr;
while (*p != '\0')
{
p1 = marr[i];
i = i + 2;
if (i > j)break;
printf ("%c\n",p1);
p++;
}
printf ("你输入的字符总长数是:%d\n",j);
return 0;
}
我想倒着不断减2要改哪里啊?? 例xiaobinbin