Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@folivetti
Created February 17, 2017 13:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save folivetti/88418218acf32feca084f86f57ee0f2e to your computer and use it in GitHub Desktop.
Save folivetti/88418218acf32feca084f86f57ee0f2e to your computer and use it in GitHub Desktop.
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
int A, B, C, D, diferenca;
Scanner sc = new Scanner(System.in);
A = sc.nextInt();
B = sc.nextInt();
C = sc.nextInt();
D = sc.nextInt();
diferenca = (A*B - C*D);
System.out.printf("DIFERENCA = %d\n", diferenca);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment