60 636
Assignments Done
97,8%
Successfully Done
In April 2018

Answer to Question #38174 in C++ for ephrem moges

Question #38174
write a C++ program that accepts a word from the user and then displays the word after reversing it.
Expert's answer
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions