E. Absolute Value

Problem Setup

  • login to CS50 IDE
  • write cd in the terminal to go to the home directory
  • write mkdir absolute to create a folder called absolute
  • write cd absolute to go to the absolute folder
  • write code absolute.cpp to create a file called absolute.cpp and open it in the editor

Problem

You are given two integers \(a\) and \(b\). Print the absolute value of \(a - b\).

Input

One line containing two integers \(a\) and \(b\) where \(1 \leq a, b \leq 10^6\).

Output

Print the absolute value of \(a - b\).

Examples

Example 1:

Input:

4 7

Output:

3

Example 2:

Input:

9 2

Output:

7

Example 3:

Input:

5 5

Output:

0

Test Your Code

Make sure you are in the absolute directory, then run the following command:

check50 iti-technical-team/problemset/2026/1/absolute

Submit Your Code

Make sure you are in the absolute directory, then run the following command:

submit50 iti-technical-team/problemset/2026/1/absolute