1. Write an
expression in Java for:
1. p= mn + 2xy +5
12m
Answers
Answered by
1
Answer:
p= m*n+2*x*y+5*12*m*n
Answered by
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)
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