216-20-guruh talabasi
Xalilov Xolbek
5-variant
2-labaratoriya ishi
2-lab_topshiriqlari
3.#include
#include
Using namespace std;
Int main(){
Unsigned int R;
Float L,S,V;
Cout<<”Aylananing radiusini kiriting: “;
Cout<<”R= “; cin>>R;
L=(float)6.28*R;
S=(float)3.14*R*R;
V=(float)4/3*3.14*(pow(R,3));
Cout<<”Aylana uzunligi L= “<
Cout<<”Aylana yuzasi S= “<
Cout<<”Shar hajmi V= “<
Main();
Return 0;
}
4
4.#include
#include
Using namespace std;
Int main(){
Unsigned int x1,x2,y1,y2,z1,z2;
Float a,b,c,S,P,p;
Cout<<”Kordinatalarni kiriting: “;
Cout<<”x1= “; cin>>x1;
Cout<<”x2= “; cin>>x1;
Cout<<”y1= “; cin>>y1;
Cout<<”y2= “; cin>>y2;
Cout<<”z1= “; cin>>z1;
Cout<<”z2= “; cin>>z2;
A=(float)sqrt((pow((abs(y1-x1)),2))+(pow((abs(y2-x2)),2)));
B=(float)sqrt((pow((abs(y1-z1)),2))+(pow((abs(y2-z2)),2)));
C=(float)sqrt((pow((abs(x1-z1)),2))+(pow((abs(x2-z2)),2)));
P=(float)a+b+c;
P=(float)P/2;
S=(float)sqrt(p*(p-b)*(p-a)*(p-c));
Cout<<”Tomon a= “<
Cout<<”Tomon b= “<
Cout<<”Tomon c= “<
Cout<<”Yuza S= “<
Cout<<”Perimetr P= “<
Main();
Return 0;
}
5.#include
#include
Using namespace std;
Int main(){
Unsigned int m1,m2,r;
Float F;
Cout<<”Jismlarning massalari va orasidagi masofani kiriting: “;
Cout<<”m1= “; cin>>m1;
Cout<<”m2= “; cin>>m2;
Cout<<”r= “; cin>>r;
F=(float)(pow(10,-11))*6.67*m1*m2/(r*r);
Cout<<”Tortishish kuchi= “<
Main();
Return 0;
}
6.#include
#include
Using namespace std;
Int main(){
Unsigned int c,a;
Float b,r;
Cout<<”To`g`ri burchakli uchburchakning gipotenuzasi va katetini kiriting: “;
Cout<<”c= “; cin>>c;
Cout<<”a= “; cin>>a;
B=(float)sqrt(c*c-a*a);
R=(float)(a+b-c)/2;
Cout<<”Ikkinchi katet b= “<
Cout<<”Ichki chizilgan aylana radiusi r= “<
Main();
Return 0;
}
7.#include
#include
Using namespace std;
Int main(){
Unsigned int L;
Float r,S;
Cout<<”Aylananing uzunligini kiriting: “;
Cout<<”L= “; cin>>L;
R=(float)L/(6.28);
S=(float)3.14*r*r;
Cout<<”Aylananing yuzasi S= “<
Main();
Return 0;
}
Do'stlaringiz bilan baham: |