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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

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!