Bir vаriаntning yechimi:
1-misol: Dekart sohasida koordinatalari (х1,у1, х2,у2,х3,у3) bo‘lgan 3 nuqta berilgan. Nuqtalar orasidagi R1, R2, R3 masofani toping. Dastur konsol rejimida bajarilsin.
//----------------------------------------------------------------------
#include
#include
#include
#include
#include
#pragma hdrstop
//---------------------------------------------------------------------
#pragma argsused
int main(int argc, char* argv[])
{
float x1, y1, x2, y2, x3, y3, r1, r2, r3;
cout<<"vvedite znachenie X1,Y1"<<"\n"; cin>>x1>>y1;
cout<<"vvedite znachenie X2,Y2"<<"\n"; cin>>x2>>y2;
cout<<"vvedite zhachenie X3,Y3"<<"\n"; cin>>x3>>y3;
r1= sqrt(pow(x2-x1,2)+pow(y2-y1,2));
r2= sqrt(pow(x3-x2,2)+pow(y3-y2,2));
r3= sqrt(pow(x3-x1,2)+pow(y3-y1,2));
cout<<"R1= "<Download 1,16 Mb. Do'stlaringiz bilan baham: |