wap to add subtract multiply and divide a number in java
Answers
Answered by
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
English,
5 months ago
Math,
5 months ago
Social Sciences,
5 months ago
Physics,
11 months ago
English,
11 months ago
Social Sciences,
1 year ago