Лаби Ptaskbook (C#). 1й курс
2

 

#include "stdafx.h"

#include <stdio.h>

#include <iostream>

#include <math.h>

 

 

int _tmain(int argc, _TCHAR* argv[])

{ float x1, y1, x2, y2;

scanf_s ("%f%f%f%f", &x1, &y1, &x2, &y2);

float r1, r2;

float k1, k2;

r1 = x1 - x2; r2 = y1 - y2;

k1 = pow(r1, 2);

k2 = pow(r2, 2);

float d = sqrt(k1+k2);

printf("D=%f\n", d);

system("pause");

return 0;