#include <iostream>
#include <conio.h>
#include <string>
using namespace std;
int main()
{
string word;
cout<<"Enter the word you'd like to reverse : ";
getline (cin , word);
cout<<"Here is the reversed word : ";
for (int i = word.size(); i >= 0; i--)
cout<<word[i];
_getch();
return 0;
}
Comments
Leave a comment