Question: Help needed with code Write a C++ program that takes all the lines input to standard input and writes them to standard output in reverse

 Help needed with code Write a C++ program that takes allHelp needed with code

Write a C++ program that takes all the lines input to standard input and writes them to standard output in reverse order. That is. each line is output in the correct order, but the ordering of the lines is reversed. Your program should terminate input when it reads "EXIT". Sample I/O 1: Input: Once upon a midnight dreary, while I pondered, weak and weary, Over many a quaint and curious volume of forgotten lore While I nodded, nearly napping, suddenly there came a tapping, As of some one gently rapping, rapping at my chamber door. '"Tis some visiter, " I muttered, "tapping at my chamber door Only this and nothing more. EXIT Output: Only this and nothing more." '"Tis some visiter, " 1 muttered, "tapping at my chamber door As of some one gently rapping, rapping at my chamber door. While 1 nodded, nearly rapping, suddenly there came a tapping, Over many a quaint and curious volume of forgotten lore Once upon a midnight dreary, while I pondered, weak and weary

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!