#include <math.h>
#include <stdio.h>

struct str_complex {
    double re, im;
    double magnitude() { return sqrt(re*re + im*im); }
};

int main()
{
    str_complex z;
    double mod;

    z.re = 2.7;
    z.im = 3.8;
    mod = z.magnitude();

    printf("%f\n", mod);

    return 0;
}
