Yangi mavzu bayoni.
1. Murakkab mantiqiy amallar natijasini aniqlang.
a) a:=true; b:=true; m:=false; bb:=NOT(a AND m) AND (a OR
b) OR m;
b) a:=77; b:=ll; m:=7; ms:= (a div b=m) AND (a mod m=0)AND NOT((a>b) OR(b2. Tarmoqlanish natijasida hosil bo'ladigan qiymatlarni aniqlang.
a) x:= -1; y:=0; a:= 0.1; IF (x*x +y >0) AND (a=l/10) THEN
mm:=true else mm:= false;
b) xl:=sqr(~l); v:= *h a'; x2:=sqrt(xl); IF (v= 'ha') AND (xl>0)
AND (x2>0) THEN xl:=0;
3. Uchta a, b va c son berilgan. aProgram m3;
Var a,b,c: real;
Begin
Write(` ani kiriting:`); readln(a);
Write(` b ni kiriting:`); readln(b);
Write(` c ni kiriting:`); readln(c);
If(a
End.
4. Berilgan A butun son berilgan B butun songa qoldiqsiz bo'linsa, bu ikkala sonning yig'indisi kvadratini, aks holda ko'paytmasini chiqaruvchi dastur tuzing.
Program m3;
Var a,b,c: integer;
Begin
Write(` ani kiriting:`); readln(a);
Write(` b ni kiriting:`); readln(b);
Write(` c ni kiriting:`); readln(c);
If B<>0 then begin
If mod B=0 then
S:=sqr(a+b)else S:=A*B;
writeln(`javob:`,S); end else writeln(`hisoblab bo`lmaydi`); readln;
End.
Berilgan butun N son musbat va 5 ga karrali bo'lsa, shu sonning kvadrat ildizini, aks holda kvadratini hisoblash dasturini tuzing.
Program m3;
Var N: integer;
K: real;
Begin
Write(` N ni kiriting:`); readln(N);
If(N>0) and (N mod 5=0) then K:=sqrt(N) else K: sqr(N);
writeln(`javob:`,K: 0:3); readln;
End.
|