Professional Documents
Culture Documents
Lab 2
Lab 2
Introduction to
Programming
Lab 2
... }
Introduction to Programming First Year 2023 -
2024
Agenda
C++ Syntax.
C++ Comments.
How To Open Dev?
1 . Start -> All program -> DEV C++ 2 . File -> New -> Project
3. Click Empty Project
Write
Select
Write the
Click
the Project
C++ OK
File Project
Name.
Name. 4
Click
Select theSave.
path.
4. Empty Project
Writing
Projectcode
ToolbarFiledetails
Implementation
5
5. C++ Syntax.
Header
6
IsAllows
whichan
is youfiles
object used
a function. are
Any
to use used
along to
with
code
names add
for thespecific
used
within
objects the functionality
toinsertion
end the main
andcurly brackets
variables tothe
{}C++
function.
operator (<<)
from to programs.
print
will the output text.
be executed.
standard library.
C++ Output ( print text ) .
** The cout object, together with the << operator , is used
to output values/print text .
Header
7
IsAllows
whichan
is youfiles
object used
a function. are
Any
to use used
along to
with
code
names add
for thespecific
used
within
objects the functionality
toinsertion
end the main
andcurly brackets
variables tothe
{}C++
function.
operator (<<)
from to programs.
print
will the output text.
be executed.
standard library.
6. Print output on screen.
7. Results
8
*
C++ Comments
{. .
● In C++, the compiler ignores the text followed by the
comments. C++ supports two different types of comments:
}
*
Exercises
{. . Write a program in c++ to print welcome
}
Thank You