Professional Documents
Culture Documents
Izraunati vrednost
0, za x=0
funkcije: y=
1, za x>0
6.
Izraunati vrednost
funkcije: y=
7.
Izraunati vrednost
funkcije: y=
8.
9.
Izraunati vrednost
funkcije: y=
5x, za x<0
X2+5 , za 0<=x<1
x 5 , za 1<=x<5
15x + 1, za x>=5
, za x<0
5, za x=0
x , za x>0
x
x1+x2, za x1<x2
3x1, za x1=x2
5x1-x2, za x1>x2
min(x,y), za y>=0
Izraunati vrednost
Max(x2,y2), za y<0
funkcije: z=
10.
Uneti duine tri dui. Ako je od njih mogue napraviti
trougao, tampati njegovu povrinu, u suprotnom tampati da je
nemogue napravi trougao.
Reenja
1.
procedure
TForm1.Button1Click(Sender:
TObject);
Var x,y,max:integer;
begin
x:=StrToInt(Edit1.Text);
y:=StrToInt(Edit2.Text);
if x>y then max:=x
else max:=y;
Label4.Caption:=IntToStr(max);
end;
procedure
TForm1.Button1Click(Sender:
TObject);
Var x,y,z,min:string;
begin
x:=Edit1.Text;
y:=Edit2.Text;
z:=Edit3.Text;
if (x<y)and (x<z) then min:=x;
if (y<x)and (y<z) then min:=y;
if (z,x)and (z<y) then min:=z;
Label5.Caption:= min;
end;
4.
procedure
TForm1.Button1Click(Sender:
TObject);
Var x,y,z,ime:string;
begin
x:=Edit1.Text;
y:=Edit2.Text;
z:=Edit3.Text;
if x='da'then if y='da' then if
z='da' then ime:='Boban'
else ime:='Goran'
else if z='da' then ime:='Djordje'
else ime:='Zarko'
else if y='da' then if z='da' then ime:='Ana'
else ime:='Vera'
else if z='da' then ime:='Dara'
else ime:='Ema';
Label5.Caption:=ime;
end;
5.
procedure
TForm1.Button1Click(Sender:
TObject);
Var x:real;y:integer;
begin
x:=StrToFloat(Edit1.Text);
if x<0 then y:=-1
else if x=0 then y:=0
else y:=1;
Label3.Caption:=IntToStr(y);
end;
6.
procedure
TForm1.Button1Click(Sender:
TObject);
Var x,y:real;
begin
x:=StrToFloat(Edit1.Text);
if x<0 then y:=5*x
else if x<1 then y:=sqr(x)+5
else if x<5 then
y:=sqrt(x+5)
else y:=15*x+1;
Label3.Caption:=FloatToStr(y);
end;
7.
procedure
TForm1.Button1Click(Sender:
TObject);
Var x:integer;y:real;
begin
x:=StrToInt(Edit1.Text);
if x<0 then y:=abs(x)
else if x=0 then y:=5
else y:=sqrt(x);
Label3.Caption:=FloatToStr(y);
end;
8.
procedure TForm1.Button1Click(Sender:
TObject);
Var x1,x2,y:integer;
begin
x1:=StrToInt(Edit1.Text);
x2:=StrToInt(Edit2.Text);
if x1<x2 then y:=x1+x2
else if x1=x2 then y:=3*x1
else y:=5*x1-x2;
Label4.Caption:=IntToStr(y);
end;
9.
procedure
TForm1.Button1Click(Sender:
TObject);
Var x,y,z:integer;
begin
x:=StrToInt(Edit1.Text);
y:=StrToInt(Edit2.Text);
if y>=0 then if x<y then z:=x
else z:=y
else if sqr(x)>sqr(y) then z:=x
else z:=y;
Label4.Caption:=IntToStr(z);
end;
10.