1. Kvadratning tomoni a berilgan. Uning perimetri aniqlansin. P=4*a


Download 4.11 Mb.
Sana10.11.2023
Hajmi4.11 Mb.
#1764527
Bog'liq
Документ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=" <return 0; }

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="<cout<<"p="<
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="<cout<<"p="<
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="<cout<<"v="<system("pause");
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="<cout<<"v="<system("pause");
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="<cout<<"S="<system("pause");
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="<system("pause");
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="<system("pause");
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="<cout<<"y1="<cout<<"y2="<system("pause");
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="<cout<<"v="<cout<<"d="<system("pause");
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=" <system ("pause");
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="<cout<<"S2="<cout<<"S3="<return 0;
}

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;
l=2*p*r;
s=p*r;

cout<<"l="<
cout<<"s="<return 0;
}
Begin15. Aylananing yuzasi S berilgan. Uning diametri d va radiusi R aniqiansin L = 2*pi *R S = pi* R2 pi = 3.14
#include
#include
int main ()
{
int l,r,s;
float const pi=3.14;
cout<<"r="; cin>>r;
l=2*3*r;
s=3*r*r;
cout<<"s=" <cout<<"l=" <return 0;
}

Begin16. Sonlar o'qida ikkita nuqta orasidagi masofa aniqiansin. X3=|x1-x2|


#include
#include
int main()
{
int x1,x2,x3;
cout<<"x1="; cin>> x1;
cout<<"x2="; cin>> x2;
x3=abs(x1-x2);
cout<<"x3="<system("pause");
return 0;
}

Begin17. Sonlar o'qida А, В, С nuqtalar berilgan. С nuqta A va В nuqtalar orasida joylashgan. AC va BC kesmalar uzunligining ko'paytmasini toping.


#include
#include
int main()
{
int ac,bc,p;
cout<<"ac=";cin>>ac;
cout<<"bc=";cin>>bc;
p=ac*bc;
cout<<"p="<
system("pause");
return 0;
}
Begin18. To'g'ri to'rtburchakning qarama-qarshi uchlari koordinatlari berilgan. Uning tomonlari koordinata o'qiga parallel. To'g'ri to'rtburchakning perimetri va yuzasi aniqiansin.
#include
#include
int main()
{
int ab,ac,s,p;
cout<<"ab=";cin>>ab;
cout<<"ac=";cin>>ac;
s=ac*ab;
p=2*(ac+ab);
cout<<"s="<cout<<"p="<
system("pause");
return 0;
}
Begin19. Tekislikdagi berilgan ikki nuqta (x1,y1) va (x2,y2) orasidagi masofa topilsin.
#include
#include
int main ()
{
int x1,x2,y1,y2;
float d;
cout<<"x1="; cin>>x1;
cout<<"x2="; cin>>x2;
cout<<"y1="; cin>>y1;
cout<<"y2="; cin>>y2;
d=sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
cout<<"d=" <system ("Pause");
return 0;
}

Begin20. x ning qiymati berilganda y=4(x-3)6-7(x-3)3+2 funksiyaning qiymati aniqlansin.


include
#include
#include
#include
int main()
{
int x,y;
cout<<"x="; cin>> x;
y=4*(x-3)*(x-3)*(x-3)*(x-3)*(x-3)*(x-3)-7*(x-3)*(x-3)*(x-3)+2;
cout<<"y="<system("pause");
return 0;

}
Begin21. A soni berilgan. A ning A2, A3, A4 , A5 darajalarini aniqlovchi programma tuzilsin.


#include
#include
int main ()
{
int a,y,y2,y3,y4;
cout<<"a="; cin>>a;
y=a*a;
y2=a*a*a;
y3=a*a*a*a;
y4=a*a*a*a*a;
cout<<"y=" <cout<<"y2=" <cout<<"y3=" <cout<<"y4=" <system ("Pause");
return 0;
}
Begin22. Temperatura TC gradus Selsiyda berilgan. Temperatura qiymatini TF Farengeytga o'tkazuvchi programma tuzilsin. TC=(TF-32)*5/9
include
#include
int main()
{
int Tc,Tf;
cout<<"Tf="; cin>> Tf;
Tc=(Tf-32)*5/9;
cout<<"Tc="<system("pause");
return 0;
}
Begin23. Birinchi avtomabilning tezligi V1 km/soat ikkinchisiniki V2 km/soat, ular orasidagi masofa S. Ular biri-biridan uzoqlasha boshlasa T vaqtdan keyin ular orasidagi masofani aniqlaydigan programma tuzilsin.
#include
#include
int main()
{
int v1,v2,l,s,t;
cout<<"t=";cin>>t;
v1=20;
v2=30;
s=60;
l=t*(v1+v2)+s;
cout<<"l="<system("pause");
return 0;
}
Begin24. A va В koeffisentlari berilgan, Ax+B =0 chiziqli tenglamaning yechimini (x ni) aniqlaydigan programma tuzilsin. A<>0
#include
#include
int main ()
{
int a,b,x;
cout<<"a="; cin>>a;
cout<<"b="; cin>>b;
x=-b/a;
cout<<"x=" <system ("Pause");
return 0;
}

Download 4.11 Mb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling