01.03.2013 Views

g. surgulaZe, g. janeliZe, i. xuciSvili

g. surgulaZe, g. janeliZe, i. xuciSvili

g. surgulaZe, g. janeliZe, i. xuciSvili

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.7. ganStoebis operatorebi if, if-else.<br />

programaSi operatorebi sruldeba mkacrad TanmimdevrobiT<br />

manamde, sanam ar gvxvdeba romelime marTvis operatori. marTvis<br />

operatori gadascems marTvas programis operatorTa erT an meore<br />

jgufs imis mixedviT, sruldeba Tu ara raime piroba. marTvis<br />

operatorebia: ganStoebis operatori if (mas agreTve uwodeben<br />

pirobiT operators), amorCevis operatori switch, ciklis operatorebi<br />

while, do while da for, upirobo gadasvlis operatori goto.<br />

C-Si ganasxvaveben ganStoebis if operatoris or formats.<br />

ganvixiloT if operatoris pirveli formati: if()<br />

operatori_1<br />

aq piroba – gamosaxulebaa (Sedarebis, logikuri an ariTme-<br />

tikuli), romlis mniSvneloba SeiZleba iyos WeSmariti an mcdari. if<br />

operatoris Sesruleba iwyeba mrgval frCxilebSi mocemuli<br />

gamosaxulebis (pirobis) gamoTvliT. Tu piroba WeSmaritia,<br />

Sesruldeba operatori_1, Tu ki mcdaria, Sesruldeba programis<br />

momdevno operatori.<br />

vTqvaT, mocemulia aRwera int x=21, y=34; xolo programaSi gvaqvs<br />

operatorebi (SemdgomSi vityviT – ganvixiloT programis fragmenti):<br />

if(x

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!