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;"
Login please!
In order to post something you must login first. You can use the form in the top of this page.