Lecture 2
Lecture 2
Lecture 2
TheUniversityofBabylon
LECTURENOTESONSTRACTUREPROGRAMMING USINGC++LANGUAGE
By Dr.SamaherHusseinAli
CollegeofInformationTechnology,UniversityofBabylon,Iraq Samaher_hussein@yahoo.com
3December2012
Algorithm
Flowchart
Words
3December2012
Dr.SamaherHusseinAli
NotesofLecture2
3December2012
Dr.SamaherHusseinAli
NotesofLecture2
3December2012
SamaherHusseinAli
NotesofLecture2
3December2012
Dr.SamaherHusseinAli
NotesofLecture2
Statements
3December2012
Dr.SamaherHusseinAli
NotesofLecture2
Comments
Commentsarepartsofthesourcecodedisregardedbythecompiler.Theysimplydo nothing.Theirpurposeisonlytoallowtheprogrammertoinsertnotesordescriptions embeddedwithinthesourcecode. C++supportstwowaystoinsertcomments: Thefirstofthem,knownaslinecomment,discardseverythingfromwherethepairof slashsigns(//)isfounduptotheendofthatsameline.Thesecondone,knownas blockcomment,discardseverythingbetweenthe/*charactersandthefirst appearanceofthe*/characters,withthepossibilityofincludingmorethanoneline.
3December2012
Dr.SamaherHusseinAli
NotesofLecture2
Variables
3December2012
Dr.SamaherHusseinAli
NotesofLecture2
Variable Types
3December2012
Dr.SamaherHusseinAli
NotesofLecture2
Variable Types
3December2012
Dr.SamaherHusseinAli
NotesofLecture2
Initialisation
3December2012
Dr.SamaherHusseinAli
NotesofLecture2