Computer Science, asked by yadavramashankar895, 3 months ago

1. Write an
expression in Java for:
1. p= mn + 2xy +5
12m​

Answers

Answered by subha90mm
1

Answer:

p= m*n+2*x*y+5*12*m*n

Answered by dreamrob
0

Answer :

p= mn + 2xy +5  × 12m​

int p , m , n , x , y;

p = m * n + 2 * x * y + 5 * 12 * m;

More expressions written in Java :

1) s = ax² + bx + c

int s , a , x , b , x , c;

s = a * Math.pow(x , 2) + b * x + c;

OR

s = a * x * x + b * x + c;

2) D = \sqrt{x^{2} + y^{2} + z^{2} } }

int D , x , y , z;

D = Math.sqrt(x * x + y * y + z * z);

OR

D = Math.sqrt(Math.pow(x , 2) + Math.pow(y , 2) + Math.pow(z , 2))

Similar questions