Computer Science, asked by sushilanjana63, 3 months ago

write the Program in bluej to calculate all the four mathematical operation​

Answers

Answered by apranshusinha
0

Answer:

import java.util.Scanner;

 

public class JavaProgram

{

   public static void main(String args[])

 {

   int first, second, add, subtract, multiply;

   float devide;

   Scanner scanner = new Scanner(System.in);

   System.out.print("Enter Two Numbers : ");

   first = scanner.nextInt();

   second = scanner.nextInt();

   add = first + second;

   subtract = first - second;

   multiply = first * second;

   devide = (float) first / second;

   System.out.println("Sum = " + add);

   System.out.println("Difference = " + subtract);

   System.out.println("Multiplication = " + multiply);

   System.out.println("Division = " + devide);

 }

}

Explanation:

hope u like my answer

Similar questions