Computer Science, asked by arjithcande7253, 3 months ago

Wap to perform all the mathematical operations of a calculator

Answers

Answered by hetchavadiya
0

Answer:

import java.util.Scanner;

class *your class name*

{

public static void main()

{

Scanner sc=new Scanner(System.in);

System.out.print("Enter the value of first number = ");

double a=sc.nextDouble();

System.out.print("enter the value of second number = ");

double b=sc.nextDouble();

System.out.println("addition = "+(a+b));

System.out.println("Subtraction = "+(a-b));

System.out.println("division = "+(a/b));

System.out.println("multiplication = "+(a*b));

}

}

Explanation:

Similar questions