Professional Documents
Culture Documents
O alu
OATA TYrES
VARTABLES
ConmoinorS a l doa.
se o e dferet
int a=\
doda pas:
e s ot
t b= 2
int,doole, oot,dho
C=atb
2-S3 .S
CoMMEN TS O
q666
To psaSant
sodemonds uhch 2.6
a r iqoad
Compilar. As
FILES OPeRATORS
HEADER (
<iostream? enhon Cos ciomoliiy ot Propray
Eincuda m e nctions adso- ug the
Content ehaaday ulos
Two TYPES OF HE ADER
FILES
Sstem haodar es1tComas ui4h tho Compileer
compilar
a. Jsor &ft headar s iten o ha prararnae
1 8 t 1ncromardt
13+ docrem&n
hom print
ORERATORS
Arnthe mehe Oppexodors ~ t , , * , /, 7. ( t t -
MANTPOiATORS
Cemdl) Used tr leam a neu line haracer
i t a 3 , b=13, C= a33,
Cout < " The vale O siheu setw is
Tvo A: 3 a < endl;
TVOAI 18 coust The valu s a witboud ctu is:
TUOA 123>
bendl;
Output cot T o u o a is Setus) Ka <<
TVOR1 end
TVotl
TVotl 1 endli
BASIC INPUT/GOTPOT
Flou inpud and outpud s knoum o eoms.
nput Sbream-Jhon darection ou
dolens daarice.
lplacorom snpd
FOr ecrom P Raooard d nei
Erampl
#incude <iosthreosm
uSine noma.sloca 8e,
ind main )
int n n 1.,masma
ingerhon Cout
E n t e r n e trolbse nasm : \ ;
operodor
ein n m1
esrockio Cau <4Ender
pradr
um i <4 hum 1
Cout 4"T
IF ELSE C++ -
incude <tostraoum)
usina hamespaco Ste
iv moin )
ent ag
Co "Tell ma
et sq 4end
Caq<1B)
Mou cannot to my
Porhu <Lend
2
else i f Coge = =8)
Coud <<Yo Qre a leid and e uill get a leid
else Poss Pr endl,
-else
adder Coud SOm
Port <<endl;
Cose
Fettrn O
Bptak Conhnue
redoonto
Eincude <iostream?
usina nomaS poco 8td
int main
i+t)
r Cint i=1;i<=40;
) conmtinue
.Chare) and
w a
Conti u a
Breoe
cout <<i (<endl
re nO
Eincude <isoam
Sing namsspo.ce std,
int moin C) Valu ad)
mta-3 erence_Of op9rator
o - e i s(Addess oporator eddress te
alhaga
aut ( T h oddress of o io<<koi
Cost <" The oddhesS io < b
Oupc
3