Computer Science, asked by ayan7456, 1 year ago

accept two numbers and display their sum ,product ,dividation , substraction and reminder - by java programming

Answers

Answered by rawatrishabh03
5
import java.util.*;
class demo
{
public static void main()
{
Scanner sc = new Scanner(System.in);
double a,b,sum,diff,div,rem;
System.out.println("Enter two numbers");
a = sc.nextDouble();
b = sc.nextDouble();
sum = a+b;
System.out.println("Sum is " + sum);
p = a×b;
System.out.println("Product is " + p);
diff = a - b;
System.out.println("Difference is " + diff);
div = a/b;
System.out.println("Dividation is " + div);
rem = a%b;
System.out.println("Remainder is " + rem);
}
}

Hope it helps plz mark me as brainliest

ayan7456: thank you but can u make a program for 9 standard a bit easy
rawatrishabh03: this is the easiest you can get
ayan7456: oh okay
Similar questions