top of page
Function body and variables
image.png

We have to select on the page and erase it completely in order to start completely from scratch
What is the body of the function? {}

  It can receive and execute many programming commands
In order for the function body to receive code commands, we have to include a library called biostream 
iostream consists of two partsi Meansinputs And o Means outputs,And inside that library there are many important tools for input and output, so it is the most important library in the c++ language.

What is the main function?
A function inside which we can pass all the codes, and it is the first function that the program calls and executes, and it is called int main
What is the output value? (output)
It is the program code that is placed in the event that we have finished putting the codes, and it is used as a signal that the program has finished, and it is called breturn 0. It does not matter what number you put, whether it is 0 or 10, it is only a signal that will appear to us in the event that we terminate the program and show the exit.  
How can we add any name with a function?
Well, this will sound strange, but if we enter any function in the program, we may put a name or a number for that, so we have to addusing namespace std, and when we add this entry we will not need to write
Entry Name::
std.  We can easily shorten it as an entry which is like a library that makes it easy for us to write entries.
 

It is a sign we put at the end of each code.
How do you put a note in the code page?
We can put a note in the code page without affecting any code in the page: 
Note that it is in one line //
The note that is on multiple lines, we start with the lineR 
*/ And we finish it /*  (/**/)

What are the variables? variables
They are addresses saved in memory that are linked to either a name or numbers

There are six types of variables:
1- Integersint: 1,2,3,4,5,7,200,2000 (numbers without commas)
2- Mixed numbersdouble: 3.47E-5 (these are numbers with commas that carry a large value) 
3- Mixed numbersfloat: 3.57, 5.678 (these are numbers with commas that are lowercase)
4- Characters and symbols ',@','char: 'A' ,'B (is a single-value variable always enclosed in single quotes) 
5-Text"string "hello (is the text and always enclosed in double quotes)
6-Comparisonbool can only have two values, either true or false.1 correct,0error)

 

bottom of page