Professional Documents
Culture Documents
tesstiIIGJP 2015 Z PDF
tesstiIIGJP 2015 Z PDF
x=3;
a=2;
PO
JO
X<4
y=2*x+1=2*3+1=7
Para: y=7
y=2x+1
y=3x+a
Zgjidhja:
Brenda unazs
x=x+1
i
.....................................
x=2+1=3
1
x=3+11=4
2
x=4+12=5
3
x=5+13=6
4
x=6+14=7
5
Ku jan:
i - variabla e unazs.
f - vlera fillestare e variabls s unazs.
p - vlera prfundimtare e variabls s unazs.
h - hapi me t cilin ndryshohen vlerat e variabls i.
a - komandat e prfshira brenda unazs.
5A. far do t shtyp ky segment i kodit?
int x=3,y=2, rez;
char op='/';
switch (op){
case '+': rez=x+y; break;
case '-': rez=x-y; break;
case '*': rez=x*y; break;
case '/': rez=x/y; break;
}
cout<< x<<op<<y<<"=" <<rez;
a)3/2=1;
b)3*2=6;
c) 3+2=5;
) 3-2=1;
a)0
b)0,1,2
c)1,2,3
)1,3,4
d)1,2,4
e)1,2,4
Kaanik
27/02/2015
Arsimtari i lnds
Ismail Dashi
Zgjidhja:
Zgjidhja:
a=5;
b=3;
x=2*a+1;
Pr a=5; b=3;
x=2*a+1=2*5=1=11;
11>6 sht true y=5*b+1=5*3=1=16
z=a+2=5+3=8
Para: y=16 dhe z=8
PO
JO
x>6
y=5b+1;
z=a+2;
y=b+1;
z=3a+b;
Zgjidhja:
Zgjidhja:
i
x=x+2
..........................
1
x=3+2=5
2
x=5+2=7
3
x=7+2=9
4
x=9+2=11
5
x=11+2=13
6
x=13+2=15
7
x=15+2=17
Ku jan:
i - variabla e unazs.
f - vlera fillestare e variabls s unazs.
p - vlera prfundimtare e variabls s unazs.
h - hapi me t cilin ndryshohen vlerat e variabls i.
a - komandat e prfshira brenda unazs.
5B. far do t shtyp ky segment i kodit?
int x=3,y=2, rez;
char op='*';
switch (op){
case '+': rez=x+y; break;
case '-': rez=x-y; break;
case '*': rez=x*y; break;
case '/': rez=x/y; break;
}
cout<< x<<op<<y<<"=" <<rez;
a)3/2=1;
b)3*2=6;
c) 3+2=5;
a)0
b)0,1,2
c)1,2,3
) 3-2=1;
)1,3,4
d)1,2,4
Kaanik
27/02/2015
Arsimtari i lnds
Ismail Dashi