#include "stdafx.h" #include<iostream> using namespace std; void reverse(char *start,char*end) { while(start<end) { char t=*start; *(start++)=*end; *(end--)=t; } } int main() { char s[100]; cin.getline(s,100); char *start=s; char *end =s; while(*end) end++; end--; reverse(start,end); cout<<s; system("pause"); return 0; }