C++编程第27题

#include <iostream>
#include "stdio.h"
using namespace std;
void converse(int n);
int main(){
int i=5;
cout<<"Please input the string : ";
converse(i);
cout<<endl;
return 0;
}
void converse(int n){
char next;
if(n<=1){
next=getchar();
putchar(next);
}else{
next=getchar();
converse(n-1);
putchar(next);
}
}

你可能感兴趣的:(编程,C++)