Computer Science, asked by anjanikumaranjan, 1 year ago

wap in java to print sum difference and product of 2 numbers

Answers

Answered by SnehalD
0

import java.io.*;

class Number

{

public static void main(String args[])throws IOException

{

int a,b,sum=0,dif=0,pro=1;

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

System.out.println("enter the two numbers.");

a=Integer.parseInt(br.readLine());

b=Integer.parseInt(br.readLine());

sum=a+b;

dif=a-b;

pro=a*b;

System.out.println("Sum="+sum);

System.out.println("Difference="+dif);

System.out.println("Product="+pro);

}

}

Answered by Aadya1234T
2

Answer:-)

Hope it helps you....

PLEASE MARK ME AS BRAINLIEST.......

Attachments:
Similar questions