Informatika fanidan (11 –sinf ) I bosqich masallar yechimi
Download 46 Kb.
|
INFORMATIKA FANIDAN (11 –sinf ) I bosqich masallar yechimi. 1. 1 dan N gach sonlarning ko’paytmasi topish dasturi. 2. Ixtiyoriy a,b,c lar uchun berilgan kvadrat tenglamani echish. 3. Kamida ikki xonali bo’lgan N natural soni berilgan bo’lsin. Unda kichik bo’lgan birinch tub sonni tiping. 4. Funksiyaning qiymatini x-ning ixtiyoriy qiymati uchun toping Agar x>0 bo’lsa y=x2+5x+6 Agar x≤0 bo’lsa y=1/(x2+5x+6) 5. Berilgan ikki sonni yig’indisini uchunchi songa ko’paytmasi. INFORMATIKA FANIDAN (11 –sinf ) I bosqich masallar yechimi. 1. 1 dan N gach sonlarning ko’paytmasi topish dasturi. uses crt; var i,n,S:longint; begin
write('N ni kiriting ='); read(n); for i:=1 to n do S:=S*i; writeln('S=',S); read(n); readln
end. 2. Ixtiyoriy a,b,c lar uchun berilgan kvadrat tenglamani echish. Program Kvadrat_tenglama; Var a,b,c:Integer; D,x1,x2:real; begin write('a ni kirit='); readln(a); write('b ni kirit='); readln(b); write('c ni kirit='); readln(c); D:=(b*b-4*a*c); if D<0 then writeln('Yechi yo`q') else begin x1:=(-b+sqr(D))/2; x2:=(-b-sqr(D))/2; if D>0 then writeln('x1=',x1:2:0); writeln('x2=',x2:2:0); end;
readln; end.
3. Kamida ikki xonali bo’lgan N natural soni berilgan bo’lsin. Unda kichik bo’lgan birinch tub sonni tiping. Program Lab_4_2; Var n,I,m: integer; y: srring[3]; Begin
Raed (‘N ni kiriting’); Writeln(n); y:=’yo’q’; While(n>2) and (‘y=yo’q’) do Begin
If in mod i=0 then y:=’ha’ i:=i+1;
end n:=n-1;
end if y:=’yo’q’ then writeln (‘Bu son=’,n) eles writeln (‘Bu son=’,2) ; end.
program lab_3_1; var x, y : real; begin
Writeln (‘x ning qiymati’); readln(x); if x>0 then y:=x2+5x+6 else y=1/(x2+5x+6) ; writeln(‘=y ’, y ); end. 5. Berilgan ikki sonni yig’indisini uchunchi songa ko’paytmasi. Var a,b,c:integer; begin read(a); read(b); read(c); writeln((a+b)*c); writeln('Tamom'); end. (10-sinf ) II bosqich masala. Ishorani aniqlovchi dastur. Birdan M gacha bo’lgan mukkammal sonlarni topish. Ixtiyoriy a,b,c lar uchun berilgan kvadrat tenglamani echish. Muntazam uchburchak yuzi. 5. 1 dan N gach sonlarning yig’indisini topish dasturi. (10-sinf ) II bosqich masalalar yechimi. 1. Ishorani aniqlovchi dastur. Program Ishora; Uses crt; var a:integer; b: string; begin
write('a ni kirit='); readln(a); If a>0 then b:='Musbat' else If a<0 then b:='Manfiy'else b:='Nol'; writeln(b); readln;
end. 2. Birdan M gacha bo’lgan mukkammal sonlarni topish. uses crt; var
m,i,s,j:longint; begin
clrscr; write (‘m ni kiriting=’); readln(m); for i:=3 to m do begin
s:=0; for j:=2 to i do if i/j=trunc(i/j) then s:=s+trunc(i/j); if i=s then write(i,' '); end; readln
end. 3. Ixtiyoriy a,b,c lar uchun berilgan kvadrat tenglamani echish. Program Kvadrat_tenglama; Var a,b,c:Integer; D,x1,x2:real; begin write('a ni kirit='); readln(a); write('b ni kirit='); readln(b); write('c ni kirit='); readln(c); D:=(b*b-4*a*c); if D<0 then writeln('Yechi yo`q') else begin x1:=(-b+sqr(D))/2; x2:=(-b-sqr(D))/2; if D>0 then writeln('x1=',x1:2:0); writeln('x2=',x2:2:0); end;
readln; end.
4.Muntazam uchburchak yuzi. uses crt; Var X,S:Real; begin Write('Tomonini kiriting='); Readln(x); S:=sqrt(3)*sqr(x)/4; Writeln('Yuzi S=', S:2:4); Readln; End.
5. 1 dan N gach sonlarning yig’indisini topish dasturi. uses crt; var i,n,S:longint; begin
write('N ni kiriting ='); read(n); for i:=1 to n do S:=S+i; writeln('S=',S); read(n); readln
end. INFORMATIKA FANIDAN (9-sinf ) I bosqich masala. 1. Berilgan tomonga ko’ra uchburchak yuzasini hisoblash dasturi Paskalda. 2. Abbos, Abduxalil, Sardor, Toxir so’zlarni ekranda ko’rsatilgan ranglarda 70 marta takrorlab chiqarish dasturi Paskalda. 3. Berilgan ikki sonni bo’lish dasturi Paskalda. 4.Berilgan soning tub yoki tub emasligini aniqlaydi. 5. Birdan N gacha 7 ga karrali toq sonlar yig’indisi va ko’paytmasini topish dasturi Paskalda. (9 –sinf ) I bosqich masallar yechimi. 1. Berilgan tomonga ko’ra uchburchak yuzasini hisoblash. Uses crt; Var a,b,c,S,p:real; begin Write('a ni kiriting a='); Readln(a); Write('b ni kiriting b='); Readln(b); Write('c ni kiriting c='); Readln(c); p:=(a+b+c)/2; S:=sqrt(p*(p-a)*(p-b)*(p-c)); Writeln('S', S:0:2); Readln; End.
uses crt; label 1; var x:integer; begin x:=1; 1:x:=x+1; textcolor(x); write('Abbos'); textcolor(x+0); write('Abduxalil'); textcolor(x+20); write('Sardor'); textcolor(x+30); write('Toxir'); if x<70 then goto 1; readln; end.
Var a,b:integer; begin read(a); read(b); writeln(a/b); writeln('Tamom'); end.
var
n,i,s:integer; begin
readln(n); for i:=2 to n-1 do if n/i=trunc(n/i) then s:=s+1; if s=0 then write('tub son') else write('tub son emas'); end.
var s,i,n,k:integer; begin write('n ni kiriting='); readln(n); s:=0; i:=7; k:=1; 1:s:=i+s; k:=k*i; i:=i+14; If i<=n then goto 1; writeln('Yigindi=',s); writeln('Kupaytma=',k); readln; end. 9-SINF AMALIY I-variant 1-topshiriq. Agar N,M natural sonlar bo’lsa, raqamlarining yig’indisi M gat eng bo’lgan barcha N dan kichik juft sonlarni aniqlovchi dastur tuzing. 2-topshiriq. Son polindrom deyiladi, agar chapdan ham o’ngdan ham bir xil o’qilsa 25000 dan kichik toq polindrom sonlarni ekranga chiqaruvchi dastur tuzing. 3-topshiriq. Natural K,N va haqiqiy a1, a2,…..,akn sonlar berilgan. Har K ta sonni o’sish tartibida saralab chop etuvchi dastur tuzing. 4-topshiriq. Tomonlari A,B natural songa teng bo’lgan to’g’ri to’rtburchak berilgan. Agar undan har safar eng katta kvadrat kesib olinaversa, nechta kvadrat hosil bo’lishini aniqlovchi dastur tuzing. 5-topshiriq. Oy va yulduzlar tasvirlangan kechki osmon manzarasini chizuvchi dastur tuzing. 9-SINF II-variant 1.Uchburchakning tomonlari a, b va ular orasidagi α burchak berilgan. Uchburchakning yuzini hisoblash dasturini tuzing: 2. ”Xush kelibsiz” matnini ekranning o’ng tomonidan 12-satrda yashil rangda qizil fonda shiqaring. 3. Uzunliklari berilgan uchta kesmadan uchburchak hosil qilish mumkin yoki mumkin emasligini aniqlovchi dastur tuzing. 4. A(1..17) massiv berilgan. Massivning 0 ga teng elementlarining indeksini chiqaruvchi dastur tuzing. 5. Ekranni teng to’rt bo’lakka bo’lib, ularni mos ravishda qizil, sariq, yashil va ko’k ranglarga bo’yang. 9-SINF AMALIY III-variant Natural sonli A(10, 10) massiv elementlarini jadval ko’rinishida ekramga chiqarish dasturini tuzing. Qavslardan iborat satr berilgan Qavslar to’g’ri yoki noto’g’ri qo’yilganligini tekshirib javob chiqaruvchi dastur tuzing: Agar AA+BB=SBS bo’lsa u holda A, B, S, raqamlarini topish dasturini tuzing. a,m,x,s natural sonlar berilgan. Y0 =a; I=1,2,…qonuuniyat asosida hosil qolingan Y1, Y2,….ketma-ketlikning |YN-YN-1| Ketma ketlikning birinchi uchta hadi –1,0,1 ekanligi ma’lum. Keyingi har bir o’zidan oldindi uchta hadning yig’indisiga teng bo’lsa, ketma ketlikning birinchi N ta hadini chiqaruvchi dastur tuzing (N<100). 1. Kubning qirrasi (a) berilgan. Uning hajmini va yon tomoni yuzasini hisoblovchi dasturi tuzilsin. 2. To’g’ri burchakli uchburchakning katetlari a va b berilgan. Uchburchakning gepatenuzasi (c) va yuzi (s) ni hisoblovchi programma tuzing. 3. Ikkita haqiqiy musbat son berilgan. Shu sonlarning o’rta arifmetigini va o`rta geometrigini aniqlovchi programma tuzilsin. 4. Teng tomonli uchburchakning tomoni (a) berilgan. Uchburchakning yuzini hisoblovchi programma tuzilsin.70>0>0>0> Download 46 Kb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling