Computer Science, asked by pirates817, 5 months ago

Write A Program In Java Take Two Number In Two Int Variable And Print Addition And Subtraction Of Them

Please answer correctly ​

Answers

Answered by jayantpradhn88
0

Answer:

sorry this topic from computer no one can give you answer.

Answered by udayagrawal49
0

Answer:

import java.util.Scanner;

public class Main {

public static void main(String[] args) {

 try {

  System.out.println("Please enter two integers");

  Scanner scan = new Scanner(System.in);

  int a = scan.nextInt();

  int b = scan.nextInt();

  scan.close();

  System.out.println("Sum of "+a+" and "+b+" is "+(a+b));

  System.out.println("Subtraction of "+a+" and "+b+" is "+(a-b));

 }

 catch (Exception e) {

  System.out.println("Some error occured");

 }

}

}

Please mark it as Brainliest.

Similar questions