Lab E111xercise 3

5
INFORMATION TECHNOLOGY EDUCATION DEPARTMENT ITE101L (INTRODUCTION TO PROGRAMMING) EXERCISE 3 INTRODUCTION TO C++ <STUDENT NAME>

description

111

Transcript of Lab E111xercise 3

INFORMATION TECHNOLOGY EDUCATION DEPARTMENTITE101L(INTRODUCTION TO PROGRAMMING)EXERCISE 3INTRODUCTION TO C++

I. OBJECTIVESAt the end of this exe!ise" st#dents $#st %e &%'e to() *no+ the st#!t#e of C,, -o.&$) Define -o.&$$in. te$ino'o.ies) /&$i'i& +ith the #se of Mi!osoft 0is#&' St#dio 1232 to de4e'o- C,, -o.&$s) *no+ the !onso'e o#t-#t &nd es!&-e se5#en!es) Use the !onso'e in-#t) En#$e&te &nd define the d&t& t6-es #sed in de4e'o-in. C,, -o.&$s) En#$e&te O-e&tos 7 Ex-ession &nd 8no+ the6 &e #sed) *no+ the ode of -e!eden!e &nd &sso!i&ti4e'69) De!'&e & 4&i&%'eII. BACKGROUND INFORMATIONSt#!t#e of & C,, -o.&$:: $6 fist -o.&$ in C,, ;in!'#de #sin. n&$es-&!e std< int $&in () =!o#t ?e''o @o'dA>< et#n 2< B:: $6 fist -o.&$ in C,, This is & !o$$ent 'ine9 A'' 'ines %e.innin. +ith t+o s'&sh si.ns (::) &e !onsideed!o$$ents &nd do not h&4e &n6 effe!t on the %eh&4io of the -o.&$9;in!'#de Cines %e.innin. +ith & h&sh si.n (;) &e die!ti4es fo the -e-o!esso9 This s-e!ifi!fi'e (ioste&$) in!'#des the de!'&&tions of the %&si! st&nd&d in-#tDo#t-#t 'i%&6 inC,,9!o#t ?e''o @o'dA>< This 'ine is & C,, st&te$ent9 A st&te$ent is & si$-'e o !o$-o#nd ex-ession th&t !&n&!t#&''6 -od#!e so$e effe!t9 E&!h st&te$ent $#st %e te$in&ted %6 & se$i!o'on (