题解 | #(a+b-c)*d的计算问题#
(a+b-c)*d的计算问题
http://www.nowcoder.com/practice/9df4b80fc3ab475288e5c26972440e1b
解题思路
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sin = new Scanner(System.in);
int a = sin.nextInt();
int b = sin.nextInt();
int c = sin.nextInt();
int d = sin.nextInt();
System.out.println((a+b-c) * d);
}
}