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 :_______________
|