Chaining <<

Lab C++ Beginner 10 points

With a single statement, print C++ was created in 1985 by Bjarne Stroustrup, where 1985 is an int expression 1980 + 5.

Input

None.

Output

One line.

Example

Output

C++ was created in 1985 by Bjarne Stroustrup
Sample output available
Editor
C++

Hints

You can chain any number of << in one statement.

Solution explanation

Each << sends the next piece to the stream; numbers and text can be mixed freely.

Show solution
#include <iostream>
using namespace std;

int main() {
    cout << "C++ was created in " << 1980 + 5 << " by Bjarne Stroustrup" << "\n";
    return 0;
}
Output
Answer
HOME LEARN COMMUNITY DASHBOARD