g. surgulaZe, g. janeliZe, i. xuciSvili

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

01.03.2013 Views

X Y X&&Y X||Y !X 1 1 1 1 0 1 0 0 1 0 0 1 0 1 1 0 0 0 0 1 cxrilidan Cans, rom && operaciis Sedegi iqneba 1 (WeSmariti), Tu operaciis orive mxares WeSmariti gamosaxulebebia (orive operandi WeSmaritia). sxva danarCen SemTxvevaSi &&-is pasuxi 0-is tolia (mcdaria). magaliTad, int a=23, x=56; aRweris pirobebSi (a>10)&&(x>40) logikuri operaciis mniSvneloba iqneba 1; (a40), (a>10)&&(x10)||(x

daabrunebs 0-s. rogorc vxedavT, Caweris Secdomam gamoiwvia araswori pasuxi. savarjiSo: CavweroT C-ze gamosaxuleba, romelic WeSmaritia mocemuli pirobis Sesrulebis SemTxvevaSi da mcdaria yvela danarCen SemTxvevaSi: 1. x ekuTvnis intervals [0; 1]: (x>=0)&&(x=0 && x=2 && x=-1 && x0) && (y>0) && (z>0) an x>0 && y>0 && z>0 5. x, y da z ricxvebidan erTi mainc dadebiTia: (x>0) || (y>0) || (z>0) an x>0 || y>0 || z>0 6. weliwads ewodeba nakiani, Tu misi rigiTi nomeri 4-is jeradia, magram 100-is jeradi wlebidan nakiania mxolod 400-is jeradebi. magaliTad, 1700, 1800 da 1900 – araa nakiani wlebi, xolo 2000 – nakiani welia. davweroT gamosaxuleba, romelic daadgens, aris Tu ara weliwadi rigiTi nomriT y nakiania operacia ? : y % 4 == 0&& y % 100 != 0 || y % 400 == 0 es enis erTaderTi 3-operandiani operaciaa. moviyvanoT ? : operaciis magaliTebi: int x=10, y=17, a=32, max, abs, min; operandebia max=(x>y)? x : y; // aq x>y – pirveli operandia; x – meore, y – mesame abs=(a>=0)? a: -a; 30

X Y X&&Y X||Y !X<br />

1 1 1 1 0<br />

1 0 0 1 0<br />

0 1 0 1 1<br />

0 0 0 0 1<br />

cxrilidan Cans, rom && operaciis Sedegi iqneba 1 (WeSmariti),<br />

Tu operaciis orive mxares WeSmariti gamosaxulebebia (orive<br />

operandi WeSmaritia). sxva danarCen SemTxvevaSi &&-is pasuxi 0-is<br />

tolia (mcdaria). magaliTad,<br />

int a=23, x=56; aRweris pirobebSi (a>10)&&(x>40) logikuri operaciis<br />

mniSvneloba iqneba 1; (a40), (a>10)&&(x10)||(x

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

Saved successfully!

Ooh no, something went wrong!