|
1- dars. Mavzu: Masalalarni kompyuterda yechish bosqichlari
|
bet | 70/145 | Sana | 14.02.2024 | Hajmi | 1,92 Mb. | | #156614 |
Bog'liq 1- dars. Mavzu Masalalarni kompyuterda yechish bosqichlari DarsYangi mavzu bayoni:
1.Quyida berilgan shakllarning shtrixlangan qismlarining yuzalarini hisoblash dasturini tuzing (yo'llanma: qanday shakl yuzasidan qaysi shakl yuzasini ayirish kerak?).
a)Program m;
Uses crt;
Var a,b,r,Pi,s: real;
Begin
Write (` b ning qiymatini kiriting=`); readln (b);
Write (` r ning qiymatini kiriting=`); readln (r);
S:=a*b-Pi*r*r;
Writeln(`shaklning yuzi S=`,S);
Readln;
End.
2. Berilgan a va b butun sonlarni qiymatini almashtiruvchi dastur tuzing, ya'ni a=7 va b=2 kiritilsa, a=2 va b=7 natija chiqsin (yo'llanma: o'rin almashtirish m: = a, a: = b, b: = m).
Program misol_ 2;
var a,b,m:Real;
begin
Write('a=’); ReadLn(a);
WriteLn (‘b= '); ReadLn(b);
m:=a; a:=b; b:=m;
WriteLn('a=’,a, ‘b=’,b);
readln;
end.
Mos ravishda R,, R2, R3, R4 qarshilikka ega bo'lgan o'tkazgichlar parallel ulanganda hosil bo'ladigan R qarshilikni hisoblash dasturini tuzing
(yo'llanma: 1/R= 1/R1+1/R2+1/R3+1/R4).
Program m3;
var R1,R2,R3,R4,N,R:Real;
begin
Write('R1 =’); ReadLn(R1);
WriteLn (‘R2= '); ); ReadLn(R2);
Write('R3 =’); ReadLn(R3);
WriteLn (‘R4= '); ); ReadLn(R4);
N:=1/R1+1/R2+1/R3+1/R4;
R:=1/N;
WriteLn('Natijaiy qarshilik R=’,R);
readln;
end.
Uyga vazifa: Mavzuni o’rganib kelish.1-mashqni bajarish.
Sana :______________
Sinf :_______________
29-dars Mavzu: O'tish va tarmoqlanish operatorlari
Darsning texnologik xaritasi
|
| |