pages:
  • 1
مصطفی SAYS

why bellow code has Runtime Error???

package acm20141; import java.util.Scanner; public class Main {

public static void main(String[] args) {
    String s,r="";
    int a,b,c,d;
    String[] str=new String[4];
    Scanner t=new Scanner(System.in);
    while(!((s=t.nextLine()).equals(  "0 0 0 0")))
    {
    str=s.split(" ");
    a = Integer.parseInt(str[0]);
    b = Integer.parseInt(str[1]);
    c = Integer.parseInt(str[2]);
    d = Integer.parseInt(str[3]);
    r+=(c-b)+" "+(d-a)+"\n";
    }
    System.out.printf(r);
}

}

M.Khooryani SAYS

remove "package acm20141;"