THE NAME OF ALLAH C++ Course First Lesson First we will talk about some concepts of programming...... First we must think before beginning in our coding and we should build our idea in our mind and write it on paper as ships to express our idea to make it easy for anyone to work in our project and this method called "Flow Chart". and we will talk about it again because we will use it. Second we should know that the programmer not making a program from NOTHING but it use some steps and rules to make it's idea or to make a program to do anything.....so I decide to make our course as stairs for any code.....we will talk about every step in the general case of any code and explain everything about it. : Libraries According to last words that every code consist of some steps and we know that the computer is a stupid machine so it must have everything to work to avoiding anything need to thinks so the libraries likes boxes contains this steps of the programming .and every library contain some steps and we write this line to use any library: #include <LibraryName.h> For Example: the most important library #include <iostream.h > And we will begin our program now with this step.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
THE NAME OF ALLAH
C++ Course
First Lesson
First we will talk about some concepts of programming......
First we must think before beginning in our coding and we should build our idea
in our mind and write it on paper as ships to express our idea to make it easy for
anyone to work in our project and this method called "Flow Chart". and we will
talk about it again because we will use it.
Second we should know that the programmer not making a program from
NOTHING but it use some steps and rules to make it's idea or to make a
program to do anything.....so I decide to make our course as stairs for any
code.....we will talk about every step in the general case of any code and explain
everything about it.
: Libraries
According to last words that every code consist of some steps and we
know that the computer is a stupid machine so it must have everything to
work to avoiding anything need to thinks so the libraries likes boxes
contains this steps of the programming .and every library contain some
steps and we write this line to use any library:
#include <LibraryName.h>
For Example:
the most important library
#include <iostream.h >
And we will begin our program now with this step.
Variables:
we use variables look like boxes to save any number to use it now or after
some time in our operations that the program like the human mind it need
to save any number or anything to do everything on it later so in
programming we use variables and memory boxes and it is different in its
size and in its uses and we will talk about it after 5 min :D :D bust you
must know that every variable has a name and we can't declare 2
variable with the same name....it will make an ERORR in
Compiler........what is Compiler?? I will explain it later.
Data Types :
As we were talking about variables we will talk about its types
Examples Range Description س Name
1 , 2 , 3 It contains just integers int
1 , 2 It take small range Short
1 , 2 ,3 It take a great range for numbers long
1.20 , 2.453 It take float points float
1.203 OR 1 It could take float or int double
'a' , '1' , '&' It take anything as character char
"Khaled" It used for text string
It take: True OR False bool
And in first w make declaration for any variable by its data type as:
Int x ;
Char y ;
And w make an "initialization" it means to give the variable an initial value
so it will be:
Int x = 0 ;……..or any value as we need and look ' ; ' ..this character is
very important to know the compiler that this step is finished.
Inputs and Outputs:
Any program need to show a lot of things to user and may be take inputs
from user or not. so we will find methods to show anything.
To show anything we will write it:
Cout<<"The Name Of Allah" ;
And we could use it as:
Cout<<"The" << "Name" << "Of"<< "Allah" ;
And this method could show the result of an operation that
Int x = 5 ;
int y = 6 ;
cout << x + y ; it will show 11.
But if we need to take the value of x and y from user so we will need to
use input method . it will be:
Int x = 0 ;
Int y = 0 ;
Cin >> x ;
Cin >> y ;
Cout << x + y ;
And we could use it to notify the user what will user input to the program
As before every cin we will use cout to give an inform to user as :
Cout << " Enter the First Number : " ;
Cin >> x ;
Now we will try First Code……But Now we will take this form as const
and I will explain it later:
#include <iostream>
using namespace std ;
int main ()
{
//Write Your Code Here
system("pause");
return 0 ;
}
Download this program Dev c++
http://bloodshed-dev-c.en.softonic.com/
and set up it and choose FileNewSource File
and write your Code and Press F9
this called Compiler it look like translator but it translate the C++ Code