Код:
#include <iostream.h>
#include <cmath.h>
struct tochka
{
int x;
int y;
int z;
};
int main(void)
{
double otvet;
tochka A,B;
cout<<"Vvedite koordinat tohki A\n";
cin>>A.x;
cin>>A.y;
cin>>A.z;
cout<<"Vvedite koordinat tohki B\n";
cin>>B.x;
cin>>B.y;
cin>>B.z;
otvet=sqrt(pow(A.x-B.x,2.0)+pow(A.y-B.y,2.0)+pow(A.z-B.z,2.0));
cout<<"Otvet "<<otvet<<"\n";
system("PAUSE");
return 0;
}