#include <stdio.h> #include <math.h> /* * Return x squared */ double sqr(double x) { return (x * x); } main() { struct s_point { double x, y; /* Coordinates */ } points[100]; int i; for (i = 0; i < 100; i++) scanf("%lg %lg", &points[i].x, &points[i].y); for (i = 0; i < 100; i++) { printf("x=%lg y=%lg ", points[i].x, points[i].y); printf("d=%lg\n", sqrt(sqr(points[i].x) + sqr(points[i].y))); } }