why Runtime Error???
مصطفی · 2016-03-22 09:52:41
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 · 2016-03-24 14:25:40
remove "package acm20141;"
pages:
- 1