Wap in java to print the following pattern:
Attachments:
Answers
Answered by
0
//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);
}
}
Similar questions