/* CS201 Programming Eample Programmer: RJB Project: Chapter 3 Demonstrating: String handling Description/Vision: Will read a word and then print it out backwards Analysis Input: A word Output: The same word Algorithm 1. read a string 2. for each subscript out the character at the OTHER end of the string! Versions: Started with backwards.cpp */ #include #include using namespace std; int main() { string s; cout << "Input a word: "; cin >> s; for(int i = 0; i < s.length(); i++) { cout << s[s.length()-i-1]; } cout << "\n"; return 0; }