Thursday, 5 January 2017

Write a program that displays your favorite poem. Use an appropriate escape sequence for the line breaks. If you don’t have a favorite poem, you can borrow this one by Ogden Nash: Candy is dandy, But liquor is quicker.

Leave a Comment


Question:

Write a program that displays your favorite poem. Use an appropriate escape sequence for the line breaks. If you don’t have a favorite poem, you can borrow this one by Ogden Nash:
            Candy is dandy,
            But liquor is quicker.

Explanation:
Below mention code is compiled in Visual Studio 2015 and Code Blocks 13.12,output snap is attached.. If any problem you feel and you want some explanation feel free to contact us.

Code:

/**************************************************|
/*************C++ Programs And Projects************|
***************************************************/

#include <iostream>
using namespace std;
int main()
{
       cout << "Candy is dandy," << endl
              << "But liquor is quicker." << endl;
       return 0;

}

Output:



Related Articles:

Object-Oriented Programming in C++ Fourth Edition By Robert Lafore Solution Manual

C++ Books Solution

If You Enjoyed This, Take 5 Seconds To Share It