#include <stdio.h>
#include <iostream.h>
void inverse(char *p)
{
if( *p == '\0' )
return;
inverse( p+1 );
printf( "%c", *p );
}
int main()
{
char str[100];
cout<<"Input your string:"<<endl;
gets(str);
inverse(str);
getchar();
return 0;
}
评论