1-cpp_basic_elements
1-cpp_basic_elements
#include<iostream>
Example: write a program that Comments:
display your name on screen: Comments are notes written be the
programmer that have no affect on
Since we what the perform output program instructions and the
operation we need to use cout compiler ignore it. The comment
instruction can be defined using // which will
and to use cout instruction we define a comment for one line.
must include iostream library To define a comment for more than
The output operation must be one line we can start the comment
define inside a function (which be /* and end it be */
is main)your name is a text data #include<iostream>
using namespace std;
so it must be written with in " "
After the output operator << /* this program is an example
how to use comments in
The program become: C++ program */