g. surgulaZe, g. janeliZe, i. xuciSvili

g. surgulaZe, g. janeliZe, i. xuciSvili g. surgulaZe, g. janeliZe, i. xuciSvili

01.03.2013 Views

} fartobi_2=0.5*a*b; sxvaoba=fartobi_2 – fartobi_1; printf(''farTobi Seicvleba %f erTeuliT'',sxvaoba); return 0; 1.5. operaciebi C-Si. tipebis gardaqmna rogorc ukve viciT, miniWebis operatori a=a+1; SeiZleba Seicvalos operatoriT a++; an operatoriT ++a; . samive SemTxvevaSi a cvladis mniSvneloba gaizrdeba 1 erTeuliT. C-Si igive moqmedebisaTvis arsebobs kidev erTi Caweris forma: a+=1; miniWebis damatebiTi operaciebi C-Si: +=, *=, –=, /=, %=. magaliTad, a+=5 niSnavs igives, ras a=a+5; a*=9 igivea, rac a=a*9; a/=13 ki igivea, rac a=a/13. amasTan, operacia a%=3 sruldeba ufro swrafad, vidre a=a%3. C-Si SesaZlebelia mravaljeradi miniWebis Sesruleba, e.i. mocemuli aRwerebis pirobebSi int x, y, z, u, a=3, b=7; daSvebulia Semdegi Canaweri: x=y=z=u=a*b; mravaljeradi miniWebis operatorSi moqmedebebi sruldeba marjvnidan marcxniv, anu jer gamoiTvleba mniSvneloba a*b (3*7=21), Semdeg es mniSvneloba eniWeba cvlads u, Semdeg cvlads z, Semdeg cvlads y da bolos cvlads x. Sedegad cvladebi x, y, z da u miiReben mniSvnelobas 21. Sedarebis operaciebi C-Si: < - naklebia; - metia; >= - meti an tolia; 27

== - udris; != - ar udris. Sedarebis operaciebis magaliTebi: a>100; x100 gamoimuSavebs mniSvnelobas mcdaria, x 1 logikuri operaciebi: && – logikuri gamravleba ( “da” ) || – logikuri Sekreba ( “an” ) ! – logikuri uaryofa C-s logikuri operaciebi Seesabameba klasikur logikur operaciebs da sruldeba Semdegi wesebis dacviT: 28

== - udris;<br />

!= - ar udris.<br />

Sedarebis operaciebis magaliTebi: a>100; x100<br />

gamoimuSavebs mniSvnelobas mcdaria, x 1<br />

logikuri operaciebi:<br />

&& – logikuri gamravleba ( “da” )<br />

|| – logikuri Sekreba ( “an” )<br />

! – logikuri uaryofa<br />

C-s logikuri operaciebi Seesabameba klasikur logikur<br />

operaciebs da sruldeba Semdegi wesebis dacviT:<br />

28

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

Saved successfully!

Ooh no, something went wrong!