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.

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.

C++ program:
 code of c++:

Write a program that displays your favorite poem. Use an appropriate escape sequence for the line breaks.


 Source code:

#include <iostream>
// iostream is a header file of standard input output function.

using namespace std;

// Th execution of program start with the main function

int main()

{

 // cout is used to display the same statemnet in the output.

       cout << "Candy is dandy," <<"\n";
/* "\n" is a escape sequence used to enter a newline character, 
we can also used "endl" for enter a newline character.*/
              << "But liquor is quicker." <<"\n";

       return 0;
}

Post a Comment

0 Comments