Distancia al origen X04437


Statement
 

pdf   zip   main.cc

html

Write a function

double dist_or(double x, double y);

which returns the distance to the origen from the point (x,y).

Input

The input is formed by two reals

Observation You only need to submit the required procedure; your main program will be ignored.

Public test cases
  • Input/Output

    dist_or(634, 371) → 734.573
  • Input/Output

    dist_or(-31, -21) → 37.4433
  • Input/Output

    dist_or(-23, 23) → 32.5269
  • Information
    Author
    Maria Serna
    Language
    English
    Translator
    Maria Serna
    Original language
    Catalan
    Other languages
    Catalan Spanish
    Official solutions
    Unknown. This problem is being checked.
    User solutions
    C++