I can reverse it but can't figure out how to reverse it in pairs.
example - hello
output - ol le h
#include <iostream>
#include <string>
using namespace std;
int main()
{
string user;
cout<<"Enter a random text"<<endl;
getline(cin,user);
for(int i = user.length();i>=0;i--)
{
cout<<user[i];
}
return 0;
}