Introduction

1.3 - Printing more lines


std::cout is used with the << operator to print out text.

Text in C++ is represented as string. The text in a string must be enclosed with double quotes (").

std::endl prints out a new line when used with std::cout and the << operator.

Task

Print out the line Fruit flies like a banana. after the first line.

  • Create another line containing:
    std::cout << "Fruit flies like a banana." << std::endl;
#include <iostream> int main() { std::cout << "Time flies like an arrow." << std::endl; }