Computer Science, asked by jewel39, 6 months ago

Write a program in java to calculate the sum, difference, product and quotient of two defined numbers depending on the operator option entered by the user. Operator options: 1 for addition, 2 for subtraction, 3 for multiplication, 4 for division and any other number entered by the user will give a message "choose the correct operator".​

Answers

Answered by vermaudit66643
1

Explanation:

What will be effect of the following on the Accounting

(i) Started business with cash * 45,000

(ii) Opened a Bank Account with a deposit of 4,500

(i) Bought goods from M/s. Sun & Co. for 11.200

Answered by tanujagautam107
0

Answer:

plz mark me as brainliest

Explanation:

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);

 }

}

Similar questions