← Problem book: C
Lesson 4 of 96 · 10 XP
Distance on a line
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
You are given two points on the number line — integers a and b (they can be negative).
Print the distance between them.
Example
Input:
2 7
Output:
5
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.