Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args)
- {
- int a, b, c, d, e;
- Scanner in = new Scanner(System.in);
- //типПеременной имяПеременной = new типПеременной();
- a = in.nextInt();
- b = in.nextInt();
- c = in.nextInt();
- if (a > b)
- d = a - b;
- else
- d = b - a;
- if (b > c)
- e = b - c;
- else
- e = c - b;
- if (d > e)
- System.out.println(d - e);
- else
- System.out.println(e-d);
- }
- }
Add Comment
Please, Sign In to add comment