关于Java中如何输入-Scanner
(a+b-c)*d的计算问题
http://www.nowcoder.com/questionTerminal/9df4b80fc3ab475288e5c26972440e1b
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner in=new Scanner(System.in);
String p=in.nextLine();
String[] pp=p.split(" ");
int a=Integer.parseInt(pp[0]);
int b=Integer.parseInt(pp[1]);
int c=Integer.parseInt(pp[2]);
int d=Integer.parseInt(pp[3]);
System.out.println((a+b-c)*d);
}
}