Professional Documents
Culture Documents
zadaci 1 Програмиеање Delphi Pascal
zadaci 1 Програмиеање Delphi Pascal
3.
1-5
1. Pascal
______________________.
2.
broj ___
________
__________________________________________________________________________ .
3. (,,)
,
)If then else
_____ ,
)Case of
_____ ,
)With
_____ ,
______ If .
4.
Pi -
_________.
5.
DIV MOD ____________ .
2-5
6.
IF Pascal
.) ,
.) ,
.) .
7.
N=10;
Repeat
.
n:=n-1;
Until n<=1
a.) n=2,
.) n=1,
.) n=0.
8.
ZBIR . :
Zbirot e: 255
Writeln(zbirot e : , zbir:5);
9.
10.
11.
Y
x2+z2/a2+b2-----------
)
)
)
3-3
If semafor=zeleno then writeln(odi) else writeln(ne odi); - izbor od dve moznosti
koga semafor=zeleno kje otpecati odi a koga ne e zeleno kje otpecxati ne odi
3
12.
,
.
) While i<=10 do _____ I 1
)
Begin
______
1 10
)
I:=I+1;
______
)
S:=S+I;
______
End;
13.
P=1*3*5*7*9**15.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
1-9
Pascal ____ _____________ ____________ _______
____________
.
____________.
: __ ________________
_________________________
______nejzinoto
ime____________________ .
O
, a ,
__________________.
X Y
)
__ ____ .
)
____ ___
)
____ ___ ,
)
____ ___
____ _________________
.
2-9
1010
.
________________________________________________________________.
Var
klas:File of ucenik; - klas- datoteka
Klasovi:File of Record klasovi datoteka od zapisi
Paralelka:string[10];
KlasenR:string[30];
BrojUc:Integer;
End;
Biblioteka:File of kniga; - biblioteka datoteka od kniga
Film
Ime string[35]
Snimen priroden broj [1900-2020]
Cena longint
OcenkaZiri Real,
3
)Deklarirajte dve promenlivi od tipot Film,
)Definirajte tip op{ta ednoindeksna niza od zapisi od tipot film.
26.
27.
28.
:
Readln(N) ;
Readln(X);
P:=1;
For i:=1 to N do
P:=P*X; eksponent
:
Seek(dat,filesize(dat);
Write(dat,zapis);
:
Program Sredina;
Var N:Integer;
Sred:Real;
Procedure SrednaVrednost;
Var I,Zbir: Integer;
Begin
zbir:=0;
For I:=1 to N do zbir:=zbir+I;
Sred:=zbir/N;
End;
Begin{Glavna programa}
Writeln(Kolku broevi sobirate?);
Readln(N);
SrednaVrednost;
Writeln(Srednata vrednost e:,Sred:7:2);
End.
____ _______________________
___________________________
_____________________ __________________________
29.
OCENKA 13
Byte.
_______________________ ___________________________________
30.
:
For I:=1 to N do
Writeln(A[I]);
_______________________________
31.
X
B .
______________
3-4
32.
.
33.
X[m,n] m<=10, n<=15 , X, m n .
34.
(NE) :
3
if podatoci[i]>podatoci[i+1] then
begin
temp:=podatoci[i];
podatoci[i]:=podatoci[i+1];
podatoci[i+1]:=temp;
podredeni:=false;
end;
35.
36.
37.
38.
:
Program Primer_1;
Var A,B,C,P,N: Real;
Function Pogolem( Broj1, Broj2:Real):Real;
Begin
If Broj1>Broj2 then
Pogolem:=Broj1
Else
Pogolem:=Broj2;
End;
Begin
Readln(A,B,C);
P:=Pogolem(A,B);
N:=Pogolem(P,C);
Writeln(n)
End.
1-4
Delphi __________
__________________________.
Object Inspector ____
_______.
__ _________________________
_ _______________________________ .
-On Activate
_____________________________________________
-On click
_____________________________________________
-On Close
______________________________________
-FormCreate _______________________________________
.
43.
Edit3.text:=inttostr(strtoint(edit1.text)+strtoint(edit2.text));
44.
45.
3-2
2
edit . edit .
, , 2
CheckBox
Bold Italic.