Chapter 2 Elementary Programming

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 45
 
Hdcf`, Dftrjmuatdjf tj Gcvc _rj`rceedf`, ]kftn Kmdtdjf, (a) 9?3; _kcrsjf Kmuactdjf, Dfa. Chh rd`nts rkskrvkm.
3
Ancptkr 9 Khkekftcry _rj`rceedf`
 
Hdcf`, Dftrjmuatdjf tj Gcvc _rj`rceedf`, ]kftn Kmdtdjf, (a) 9?3; _kcrsjf Kmuactdjf, Dfa. Chh rd`nts rkskrvkm.
9
Ejtdvctdjfs
Df tnk prkakmdf` ancptkr, yju hkcrfkm njw tj arkctk, ajepdhk, cfm ruf c Gcvc prj`rce. Qtcrtdf` brje tnds ancptkr, yju wdhh hkcrf njw tj sjhvk  prcatdach prjihkes prj`rceectdachhy. ]nrju`n tnksk prjihkes, yju wdhh hkcrf Gcvc prdedtdvk mctc typks cfm rkhctkm suigkats, suan cs vcrdcihks, ajfstcfts, mctc typks, jpkrctjrs, kxprkssdjfs, cfm dfput cfm jutput.
5
 
Hdcf`, Dftrjmuatdjf tj Gcvc _rj`rceedf`, ]kftn Kmdtdjf, (a) 9?3; _kcrsjf Kmuactdjf, Dfa. Chh rd`nts rkskrvkm.
1
Jigkatdvks
]j wrdtk Gcvc prj`rces tj pkrbjre sdephk ajeputctdjfs (§9.9).
]j jitcdf dfput brje tnk ajfsjhk usdf` tnk
Qacffkr
 ahcss (§9.1).
]j usk dmkftdbdkrs tj fcek vcrdcihks, ajfstcfts, ektnjms, cfm ahcssks (§9.=).
]j usk vcrdcihks tj stjrk mctc (§§9.;‑9.2).
]j prj`rce wdtn cssd`fekft stctkekfts cfm cssd`fekft kxprkssdjfs (§9.2).
]j usk ajfstcfts tj stjrk pkrecfkft mctc (§9.0).
]j fcek ahcssks, ektnjms, vcrdcihks, cfm ajfstcfts iy bjhhjwdf` tnkdr fcedf` ajfvkftdjfs (§9.>).
]j kxphjrk Gcvc fuekrda prdedtdvk mctc typks7
iytk
,
snjrt
,
dft
,
hjf`
,
bhjct
, cfm
mjuihk
 (§9.4.3).
]j rkcm c
iytk
,
snjrt
,
dft
,
hjf`
,
bhjct
, jr
mjuihk
 vchuk brje tnk lkyijcrm (§9.4.9).
]j pkrbjre jpkrctdjfs usdf` jpkrctjrs
+
,
-
,
*
,
/
, cfm
%
 (§9.4.1).
]j pkrbjre kxpjfkft jpkrctdjfs usdf`
Ectn.pjw(c, i)
 (§9.4.=).
]j wrdtk dftk`kr hdtkrchs, bhjctdf`-pjdft hdtkrchs, cfm hdtkrchs df sadkftdbda fjtctdjf (§9.3?).
]j wrdtk cfm kvchuctk fuekrda kxprkssdjfs (§9.33).
]j jitcdf tnk aurrkft systke tdek usdf`
Qystke.aurrkft]dekEdhhds()
 (§9.39).
]j usk cu`ekftkm cssd`fekft jpkrctjrs (§9.31).
]j mdstdf`udsn iktwkkf pjstdfarkekft cfm prkdfarkekft cfm iktwkkf pjstmkarkekft cfm prkmkarkekft (§9.3=).
]j acst tnk vchuk jb jfk typk tj cfjtnkr typk (§9.3;).
]j mksardik tnk sjbtwcrk mkvkhjpekft prjakss cfm cpphy dt tj mkvkhjp tnk hjcf pcyekft prj`rce (§9.32).
]j wrdtk c prj`rce tnct ajfvkrts c hcr`k cejuft jb ejfky dftj sechhkr ufdts (§9.30).
]j cvjdm ajeejf krrjrs cfm pdtbchhs df khkekftcry prj`rceedf` (§9.3>).
5
 
Hdcf`, Dftrjmuatdjf tj Gcvc _rj`rceedf`, ]kftn Kmdtdjf, (a) 9?3; _kcrsjf Kmuactdjf, Dfa. Chh rd`nts rkskrvkm.
=
Dftrjmuadf` _rj`rceedf` wdtn cf Kxcephk
Hdstdf` 9.3 Ajeputdf` tnk Crkc jb c Adrahk ]nds prj`rce ajeputks tnk crkc jb tnk adrahk.
AjeputkCrkc
 
AjeputkCrkcYuf
 
YufCfdectdjf
DE_JY]CF] FJ]K7 Db yju acffjt ruf tnk iuttjfs, skk www.as.crestrjf`.kmu/hdcf`/gcvcshdmkfjtk.mja.
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5
5

Reward Your Curiosity

Everything you want to read.
Anytime. Anywhere. Any device.
No Commitment. Cancel anytime.
576648e32a3d8b82ca71961b7a986505