monkeyslut45

Кирилл Деменев

Oct 21st, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4.  
  5.     public static void main(String[] args)
  6.     {
  7.         int a, b, c, d, e;
  8.         Scanner in = new Scanner(System.in);
  9.         //типПеременной имяПеременной = new типПеременной();
  10.         a = in.nextInt();
  11.         b = in.nextInt();
  12.         c = in.nextInt();
  13.         if (a > b)
  14.             d = a - b;
  15.         else
  16.             d = b - a;
  17.         if (b > c)
  18.             e = b - c;
  19.         else
  20.             e = c - b;
  21.         if (d > e)
  22.             System.out.println(d - e);
  23.         else
  24.             System.out.println(e-d);
  25.     }
  26. }
Add Comment
Please, Sign In to add comment