Computer Science, asked by anuragshubh28, 8 months ago

wap to add subtract multiply and divide a number in java

Answers

Answered by tara0000
4

hear's your answer

import java. until. *;

class Sample

{

public static void main (String args[ ])

{

Scanner scale = new Scanner (System. in);

int a, b, c, d, e, f;

Sopln("Enter 1st number ");

a = sc.nextInt( );

Sopln("Enter 2nd number ");

b = sc.nextInt( );

c = a + b;

d = a - b;

e = c * d;

f = e / c + d;

Sopln ("Result is" + f );

}

}

please mark me a brainlist and thanks if it helped

Similar questions