Kif 213-20 talabasi Bekpulatov Shoxruh using namespace std


Download 11.9 Kb.
Sana07.11.2020
Hajmi11.9 Kb.
#141939
Bog'liq
labaratoriya ishi 2


#include

#include

//KIF 213-20 talabasi Bekpulatov Shoxruh

using namespace std;

int main(int argc, char** argv) {

float x1, y1, z1,x2,y2,z2,x3,y3,z3,a,b,c,p,P,S;

cout<<" X1=";

cin>>x1;

cout<<"y1=";

cin>>y1;

cout<<"z1=";

cin>>z1;

cout<<"x2=";

cin>>x2;

cout<<"y2=";

cin>>y2;

cout<<"z2=";

cin>>z2;

cout<<"x3=";

cin>>x3;

cout<<"y3=";

cin>>y3;

cout<<"z3=";

cin>>z3;

a=sqrt(pow((x1-x2),2)+pow((y1-y2),2)+pow((z1-z2),2));

b=sqrt(pow((x1-x3),2)+pow((y1-y3),2)+pow((z1-z3),2));

c=sqrt(pow((x3-x2),2)+pow((y3-y2),2)+pow((z3-z2),2));

p=(a+b+c)/2;

S= sqrt(p*(p-a)*(p-b)*(p-c));

P=2*p;


cout<<"P="<


cout<<"S="<return 0;



}

Download 11.9 Kb.

Do'stlaringiz bilan baham:




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