Exercise 1:

The target of this exercise is to write a program to calculate the center and the radius of the circunference that go over three given points: (x1,y1), (x2,y2) and (x3,y3).

Don't pay attention to special cases where the points are repeated or aligned. We will treat these cases in the future.

To solve this problem we must solve a system with three equations and three variables: The distance between the three points and the circunference center is equal to the circunference radius.

r^2 = (x1-x)^2 + (y1-y)^2
r^2 = (x2-x)^2 + (y2-y)^2
r^2 = (x3-x)^2 + (y3-y)^2
where r is the circunference radius, and (x,y) is the circunference center.

The solution of this equation system is:

y = (a*f-c*d)/(b*d-a*e)
x = y*b/a +c/a
r = sqrt((x1-x)^2 + (y1-y)^2)
where a, b, c, d, e and f are auxiliary variables:

a = 2*(x2-x1)
b = 2*(y2-y1)
c = x1*x1 + y1*y1 - x2*x2 - y2*y2
d = 2*(x3-x1)
e = 2*(y3-y1)
f = x1*x1 + y1*y1 - x3*x3 - y3*y3
Then, write a program that implements these expressions and prints the value of r, x and y.