shlogg · Early preview
Mehfila A Parkkulthil @mehfila123

How To Print In C++: Using Cout, Namespace, And Newline Characters

Learn C++ basics! Print text with `cout`, use `std::` or `using namespace std`. Add new line with `\n` or `endl`. Comments: single-line (`//`) and multi-line (`/* */`).

Please refer Introduction to C++  before you proceed .


  
  
  Topics to be covered

How to Print in C++ (or to get output in c++).
How to add a new line character (Escape sequence).
Comments



  
  
  How to Print in C++

The programming instruction we give are called statements.
The statements are executed one by one , in the order they are written.
The compiler ignores all the white space.
Everything that needs to be executed should be written inside curly {}brackets.

To print any form of text or numbers or to get output we use cout (pronounced as see-out).
For Example:

Imagine we want...