Module: Arithmetic expressions


Problem

3 /7


Built-in Functions

Theory Click to read/hide

Inline Functions
Any programming language includes many built-in functions that can be used in arithmetic expressions.
To use additional functions, you often need to include additional libraries.

For example, the most commonly used standard mathematical functions and how they are written in Pascal
 abs(i) number module i;
 sqrt(x) square root of x;
 power(x,y) calculates x to the power of y (always returns a real number).

It must be remembered that the function argument is always written in brackets.
For the power()  function to work, you need to connect an additional mathematical library.
You can do this by adding a line before the variable declaration: uses math; var ...

Problem

Write a program that determines the distance between two points with given coordinates x1 and x2 on the numeric axis. The distance between two points is calculated using the formula \(|x_2 - x_1|\).
The first line of input contains two real numbers. Output one real number – distance between two points. Round your answer to 3 decimal places.
 
Examples
# Input Output
1 100000 0 100000.000