Introducing the Output Stream 'cout'

Learn to write a program that displays the table of a number using the 'cout' statement in C++.

In this lesson, we will write a program in C++ that displays a table of a number.

We’ll begin with basic C++ program elements, including the cout instruction, the syntax error, and some basic arithmetic operations. Finally, we’ll write a simple table printing program using the cout instruction.

Basics of writing a C++ program

Let’s begin by learning to display a simple message on the console in C++.

Displaying a message

Here is our first C++ program, which prints the message Hello Turing! Welcome to the world of C++.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy