Write the Java statements for the following Mathematical statements
i) a2 + b2 + 2c ii) abc + ab
Answers
Answered by
0
Answer:
For storing answers I took variable y
i) a²+b²+c² = y=(a*a)+(b*b)+(c*c)
OR
y=Math.pow(a,2) + Math.pow(b,2)+ Math.pow(c,2)
ii) abc+ ab = y= (a*b*c)+(a*b)
Similar questions