Computer Science, asked by yash197911, 8 months ago

Find the error in the java program

//author :@Dark_Panther(Yash Raj)
import java.util.*;
public class Calculator
{
public static void main(String args[])
{

Scanner sc = new Scanner(System.in);
double a,b,c,d,e,f;
System.out.print("Enter two integers : ");
a=sc.nextDouble();
b=sc.nextDouble();
c=a+b;
d=a-b;
e=a*b;
f=a/b;
System.out.println("Sum="+c);
System.out.println("Difference="+d);
System.out.println("Product="+e);
System.out.println("Quotient="+f);
}
}​

Answers

Answered by Anonymous
2

Answer:

See attachment for answer

Attachments:
Answered by AskewTronics
1

NO Error :

Explanation:

  • The above java program code has no error, if a user wants to run this program, then firstly he needs to write this code on any editor and save This file with the name of "Calculator.java". Then this program will be compiled and run.
  • The above program takes the input of two number of float type and then print the addition, subtraction, division and multiplication value of that integer.

Learn More:

  • Java: https://brainly.in/question/13792074
Similar questions