/* CS201 Programming Eample Programmer: RJB Project: Chapter 3 Demonstrating: String handling Description/Vision: Will read input and then print it out backwards Analysis Input: A sequence of characters Output: The same sequence reversed By putting input characters in front of the previous characters we can build a reversed string Algorithm 1. Keep reading character c until the end 1.1 put c in front of s 2. Print s Versions: Downloaded Dr. Botting's skeleton file. Wed Feb 6 17:08:51 PST 2008 */ #include #include using namespace std; int main() { char c; string s; while(cin.get(c)) { s = c + s; } cout << s; return 0; }