Computer Programming Contest Preparation

ToolBox - Source for: 100/10055/Main.java



/home/toolbox/public_html/solutions/100/10055/Main.java
    1 package mypkg;
    2 import java.util.Scanner;
    3 class Main
    4 {
    5 
    6     public static void main(String[] args)
    7     {
    8         Scanner in=new Scanner (System.in);
    9         while(in.hasNext())
   10             {
   11                 long a=in.nextLong();
   12                 long b=in.nextLong();
   13                 if(a>b)
   14                     System.out.println(a-b);
   15                 else
   16                     System.out.println(b-a);
   17 
   18             }
   19     }
   20 
   21 }
   22