Yangi mavzuni mustaxkamlash.
1. Uchta son berilgan. Ular ichida manfiy sonlarning kubini hisoblovchi dastur tuzing.
Program masala_1;
Label tamom;
Var a, b,c: Real;
Begin ClrScr
Write(‘1- sonni kiriting: '); ReadLn(a);
Write(‘2-sonni kiriting: '); ReadLn(b);
Write(‘3-sonni kiriting: '); ReadLn(c);
If(a>=0) and (b>=0) and (c>=0) Then begin
WriteLn('Bu sonlar orasida manfiylari yo’q’); goto tamom; end;
If a<0 then WriteLn( a,’ning kubi=’,a*a*a);
If b<0 then WriteLn( b,’ning kubi=’,b*b*b)
If a<0 then WriteLn( c,’ning kubi=’,c*c*c)
tamom: End.
2. Berilgan butun son manfiy bo'lsa, uning modulini hisoblash dasturi tuzilsin. Dasturni 2 xil usulda, modul hisoblash uchun abs(x) funksiyasidan foydalanib va foydalanmasdan tuzing.
3. Parol «informatika» bo'lsa, u holda parol to'g'ri kiritilganini tekshi- ruvchi dastur tuzing.
Uyga vazifa: Darslikdagi 6-mashq.Test tuzish (5 ta va undan ortiq). 3*. Darslikdagi 7-mashq.
Sana :________________
Sinf :______________
0>0>0>
|