Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / pract. 01 / task4.cpp
blob: b4829b42b34a6972d8b1054444f4cb560df11427 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
	 double x1, y1, x2, y2;

	 cout << "x1: ";
	 cin >> x1;

	 cout << "y1: ";
	 cin >> y1;

	 cout << "x2: ";
	 cin >> x2;

	 cout << "y2: ";
	 cin >> y2;

	 cout << round(sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)) * 100) / 100 << endl;

	 return 0;
}