1. Kvadratning tomoni a berilgan. Uning perimetri aniqlansin. P=4*a
Download 4.11 Mb.
|
Документ1212
1. Kvadratning tomoni a berilgan. Uning perimetri aniqlansin. P=4*a #include int main(){ float a,P; cout<<"a"; cin>> a; P:=4*a; cout<<"P=" < return 0;} 2. Kvadratningtomoni a berilgan. Uning yuzasi aniqiansin. S=a2 #include #include int main (){ int S,a; cout<<"a="; cin>>a; S=sqr(a); cout<<"S=" < 3. To'g'ri to'rtburchakning tomonlari a va b berilgan. Uning yuzasi S = a * b; va P = 2 * (a + b) perimetri aniqiansin. #include #include int main(){ float a,b,s,p; cout<<"a=";cin>>a; cout<<"b=";cin>>b; s=a*b; p=2*(a+b); cout<<"s="< return 0; } Begin4. Aylananing diametri d berilgan. Uning uzunligi aniqiansin L=pi*d. pi = 3.14 #include #include int main(){ float L,d; float const pi=3.14; cout<<"d=";cin>>d; L=pi*d; cout<<"L="< return 0; } Begin5. Kubning yon tomoni a berilgan. Uning hajmini V = a3 va tola sirti S=6*a2 aniqiansin. #include #include int main() { int a,s,v; cout<<"a=";cin>>a; s=6*a*a; v=a*a*a; cout<<"s="< return 0; } Begin6. Paralelepepidning tomonlari a, b, с berilgan. Uning hajmini V = a*b*c va to’la sirti S = 2*(a*b+b*c+a*c) aniqlansin. #include #include int main() { int a,b,c,s,v; cout<<"a=";cin>>a; cout<<"b=";cin>>b; cout<<"b=";cin>>b; v=a*b*c; s=2*(a*b+b*c+a*c); cout<<"s="< return 0; } Begin7. Doiraning radiusi R berilgan. Uning uzunligi L va yuzasi S aniqiansin. L = 2 pi R . S = pi *R2 #include #include int main() { float L,S,R; float const pi=3.14; cout<<"R=";cin>>R; L=2*pi*R; S=pi*sqr(R); cout<<"L="< return 0; } Begin8. Ikkita son a va b berilgan. Ularning o’rta arifmetigi aniqiansin. Y=(a+b)/2 #include #include int main() { float a,b,y; cout<<"a=";cin>>a; cout<<"b=";cin>>b; y=(a+b)/2; cout<<"y="< return 0; } Begin9. Ikkita manfiy bo'Imagan son a va b berilgan. Ularning o'rta geometrigi aniqiansin. Y=sqrt(a*b) #include #include int main() { float a,b,y; cout<<"a=";cin>>a; cout<<"b=";cin>>b; y=sqrt(a*b); cout<<"y="< return 0; } Begin10. Nolga teng bo'Imagan ikkita son berilgan. Ularning yig'indisini, ko’paytmasini va har birining kvadrati aniqiansin. #include #include int main() { float a,b,y,y1,y2; cout<<"a=";cin>>a; cout<<"b=";cin>>b; y=a+b; y1=a*b; y2=sqr(a)+sqr(b); cout<<"y="< return 0; } Begin11. Nolga teng bo'Imagan ikkita son berilgan. Ularning yig'indisini, ko’paytmasini va har birining moduli aniqiansin. #include #include int main() { int a,b,s,v,d; cout<<"a=";cin>>a; cout<<"b=";cin>>b; s=a+b; v=a*b; d=abs(a) cout<<"s="< return 0; } Begin12. To'gri uchburchakning katetlari a va b berilgan. Uning gipotenuzasi с va perimetri P aniqiansin. C=sqrt(sqr(a)+sqr(b)), P=a+b+c #include #inceude int main() {float a,b,c,p; cout<<"a"; cin>> a; cout<<"b"; cin>> b; cout<<"c"; cin>> c; p=a+b+c; c:=sqrt(sqr(a)+sqr(b)); cout<<"p=" < cout<<"c=" < return 0; } Begin13. Umumiy markazga ega bo'lgan ikkita aylana radiusi berilgan. R1,R2 (R1>R2).Ularnig yuzalari S1 va S2, ularning ayirmasi S3 aniqiansin. Sl =pi*R12, S2=pi*R22, S3 =pi(R12- R22). #include #include int main() { int R1,R2,S1,S2,S3; float const PI=3.14; cout<<"R1="; cin>> R1; cout<<"R2="; cin>> R2; S1=PI*R1*R1; S2=PI*R2*R2; S3=PI*(R1*R1-R2*R2); cout<<"S1="< } A, [26.10.2023 13:16] Begin14. Aylananing uzunligi L berilgan. Uning radiusi R va yuzasi S aniqiansin L = 2* pi *R S = pi*R pi = 3.14 #include #include int main () { float s,l,r; float const pi=3.14; cout<<"r=";cin>> r;
cout<<"l="< Begin16. Sonlar o'qida ikkita nuqta orasidagi masofa aniqiansin. X3=|x1-x2| Begin17. Sonlar o'qida А, В, С nuqtalar berilgan. С nuqta A va В nuqtalar orasida joylashgan. AC va BC kesmalar uzunligining ko'paytmasini toping. Begin20. x ning qiymati berilganda y=4(x-3)6-7(x-3)3+2 funksiyaning qiymati aniqlansin. }
Download 4.11 Mb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling