|
Yangi mavzuni mustahkamlash
|
bet | 84/145 | Sana | 14.02.2024 | Hajmi | 1,92 Mb. | | #156614 |
Bog'liq 1- dars. Mavzu Masalalarni kompyuterda yechish bosqichlari DarsYangi mavzuni mustahkamlash.
1. Quyidagi operatorlardagi takrorlanishlar sonini aniqlang.
a) for i:=l to 88 do b:=l; (88-1)+1=88 marta
b) for i:=73 to 161 do m:=2; (161-73)+1= 80marta
d) for i:= -21 to 0 do a:=3; (0-(-21))+1=22marta
e) a:=5; b:=34; for i:=a+7 to b-1 do s:=s+l;
2*b+8-a*a+1=2*19+8-5*5+1=22marta
f) a:=5; b:=19; for i:=a*a to 2*b+8 do s:=s+l;
2. y = 21x2 + Ix + 1963 funksiyaning qiymatini x ning —5, —4, —3, —2, —1, 0, 1, 2, 3, 4, 5 qiymatlarida hisoblash dasturini tuzing.
Program masala_2;
Uses Crt;
Var x,y:integer;
Begin
For x:=-5 to 5 do
Writeln(x,’bo’lganda y=’, 21*x*x+7*x+1963);
Readln ;
End.
3. y = 23x + 1 funksiyaning qiymatini x ning [-15, 5] oraliqdagi butun qiymatlarida hisoblash dasturini tuzing.
Program masala_3;
Uses Crt;
Var x,y:integer;
Begin
For x:=-15 to 5 do
Writeln(x,’bo’lganda y=’, 23*x+1);
Readln ;
End.
Uyga vazifa: Mavzuni o`rganish. 4-5-mashq.
4. A[1..17] massiv berilgan. Massivning nolga teng elementlarining indeksini chiqaruvchi dastur tuzing.
Program masala_4;
Uses Crt;
Var i: integer; a: array[1..17]of real;
Begin
For i:=1 to 17 do
Begin writeln(i,’-elementni kiriting=’); Readln(a[i]) ; end;
Writeln(‘Nolga teng elementlarning indekslari’);
For i:=0 to 17 do
If a[i] =0 writeln(i); readln;
End.
5. y = 2x + 19 funksiyaning qiymatini x ning [0, 10] oraliqda 0,25 qadam bilan hisoblash dasturini tuzing (yo'llanma: i= 0 da x=0; i= 1 da x=0,25; ...; /=40 da x=10).
Program masala_5;
Uses Crt;
Var i:integer; x,y:real;
Begin
For i:=0 to 40 do
Writeln(x,’bo’lganda y=’, 5*x+19); x:=x+0.25;
Readln ;
End.
Sana :______________
Sinf :_______________
34-dars Mavzu: Parametrli takrorlash operatori mavzusini takrorlash
|
| |