fork download
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. long x = scanner.nextInt();
  8. long y = scanner.nextInt();
  9. long sum= x+y;
  10. long multi= x*y ;
  11. long sub= x-y;
  12.  
  13. System.out.println(x +" + "+ y + " = " + sum);
  14. System.out.println(x +" * " + y + " = " + multi);
  15. System.out.println(x +" - " + y + " = " + sub);
  16. scanner.close();
  17.  
  18.  
  19. }
  20. }
  21.  
Success #stdin #stdout 0.17s 60912KB
stdin
4
5
stdout
4 + 5 = 9
4 * 5 = 20
4 - 5 = -1