begin
readln(a,b);
d: =a-b; f : = a *a-b *b;
th(a,tl); th(a-b,t2); th(f,t3);
z:=(tl+t2)/sqrt(l +sqr(t3));
w n te(’z= \z);
end.
2-misol.
Tekislikda berilgan
(x,y)
nuqtaning qutb koor-
dinatalarini va ,
x>0,
formulalar bo‘yicha hisoblash uchun
protsedura qism dasturidan foydalanib dastur tuzing.
Dasturni tuzishda parametrsiz protsedura qism dasturdan
foydalanamiz. Bizga tekislikda
n
ta nuqta
(x,u)
koordinatalari
bilan berilgan boNsin. Ular bar birining qutb koordinatalarini
hisoblashga dastur tuzamiz. Dastuming ko‘rinishi:
program qutb (input,output);
v a rx,y,rf . real;
n,i
: integer;
procedure polar;
begin
r: =sqrt(x *x+y *y);
f:=arctan(y/x);
end;
begin
read(n);
fo r i:= l to n do
begin
read(x,y); polar;
write (rj);
end;
end.
S a v o l v a to p s h iriq la r
1. Berilgan uchta sonning eng kichigini
topishga blok-sxem a va
d a stu r tuzing.
2. Berilgan ikkita sonni kam ayish tartibida tartiblashga dastur
tuzing.
401
3. B e rilg a n u c h t a s o n n i n g e n g kichigini t o p i s h g a d a s t u r tu z in g .
4 . B erilgan u c h t a so n n i k a m a y i s h ta r ti b id a b o s m a g a c h iq a r is h
u c h u n d a s t u r tuzing.
5. To'g'ri t o 'r tb u r c h a k l a r u sulining m o h iy atin i tu s h u n ti r i b b e rin g .
6
. T r a p e t s iy a l a r usu lin ing m ohiyatini tu s h u n t i r ib b erin g .
7.
F u n k s i y a n in g
(0;1)
o r a l iq d a g i
a n iq
integra lini
to'g'ri
to 'r tb u r c h a k l a r (tra p e ts iy a la r) usuli bilan h i s o b l a s h g a d a s t u r tu z in g ,
q a d a m l a r s o n i n= 20.
8
. Bir o'lchovli m a s s iv la rn i t a ’riflang.
9. M a s s iv la r P a s k a l tilida q a n d a y i f o d a la n a d i ?
10 .
Bir
o'lchovli
m a s s i v
m u s b a t
e l e m e n tl a r i n in g
o 'rta
geometrikligini h i s o b l a s h g a d a s t u r tu z in g .
11.
Bir o'lchovli m a s s i v e l e m e n tl a r i n in g e n g kichigini t o p i s h g a
d a s t u r tuzing.
12
. Ikki o'lchovli m a s siv la r, u la r n in g d a s t u r d a if o d a la n ish in i
aytib
bering.
13. Ikki o'lchovli m a s s i v m an fiy e l e m e n t l a r i so n in i t o p i s h u c h u n
d a s t u r tuzing.
14. Ikki o'lchovli m a s s i v m u s b a t e l e m e n tl a r i n i n g o 'r t a arifmetigini
to p i s h u c h u n d a s t u r tuzing.
15. Q ism d a s t u r l a r n im a, q a n d a y q i s m d a s t u r l a r n i b il a s iz ?
16. F u n k s i y a q is m d a s t u rin in g vazifalarini ay tib b erin g .
17. F u n k s i y a q is m d a s t u rin in g u m u m i y ko'rinishi q a n d a y ?
18. F u k n s i y a q is m d a s t u r i ishtiro k e t g a n
d a s t u r g a m iso llor
keltiring.
19 . Lokal, g lo bal, fo rm al v a h a q iq iy p a r a m e t r l a r n i n g ta'riflarini
aytib bering.
20. P r o t s e d u r a q i s m d a s t u r i n i m a ?
21.
F u n k s i y a q is m d a s tu ri v a p r o t s e d u r a q is m d a s t u r in i n g bir-
biridan farqini ayting.
22. P r o t s e d u r a q i s m d a s t u r in in g u m u m i y ko'rinishi q a n d a y ?
2 3 . P r o t s e d u r a q is m d a s t u r i ishtiro k e t g a n d a s t u r g a m iso llor
keltiring.
402
XIV B O B . DELPHI
D A S T U R L A S H MUHITI
14.1. DELPH I M UHITI T O ‘G ‘RISIDA DASTLABKI
MA’LUMOTLAR
D elphi m uhiti - bu dasturchi ishining sam aradorligi-
ni oshiruvchi m urakkab mexanizmdir. U ekranda Delphi
ning bir necha ochilgan oynalari y ordam ida am alga oshi-
riladi. M S Word yoki MS Excel da ishlovchi odam ga
oynalam i tartibsiz joylashgani noqulaylik tu g ‘diradi. Le-
kin D elphida bir necha m arotaba
ishlagandan keyin das-
turchiga bu noqulayliklar sezilmaydi va u o ‘ziga kerak
bo ‘lgan oynani tez topadi. Delphi ni ikki usulda ishga
tushirish mumkin:
1.
П уск (Start)
knopkasi bosiladi,
П рограмм ы
satri
tanlanadi va
B orland D elphi6
satridagi
D elphi6
dasturi
ishga tushiriladi. (14.1-rasm);
& ***
О С"*
Q C rorSouM *
Dostları ilə paylaş: