Program To Reverse Any String with Builtin Function in C++

#include<iostream>
#include<conio.h>
#include<string>

using namespace std;

void main()
{
string input;

cout<<"Enter The String: ";
getline(cin,input);

reverse(input.begin(),input.end());

cout<<input<<endl;

system("pause");


}

No comments:

Post a Comment