哪有错误呀,看不出来呀
题目:利用递归函数调用方式,将所输入的5个字符,以相反顺序打印出来。#include"stdio.h"
void main()
{
int i=5;
void palin(int n);
printf("\40:");
palin(i);
printf("\n");
}
void palin(int n)
{
char next;
if(n<=1)
{
next=getchar();
printf("\n\0:");
putchar(next);
}
else
{
next=getchar();
palin(n-1);
putchar(next);
}
}
Compiling...
30.cpp
E:\xyq\30.cpp(17) : error C2018: unknown character '0xa1'
E:\xyq\30.cpp(17) : error C2018: unknown character '0xa1'
Error executing cl.exe.
30.obj - 2 error(s), 0 warning(s)