ICSE Class 10 Computer Applications Question 16 of 30

Solved 2024 Question Paper ICSE Class 10 Computer Applications — Question 21

Back to all questions
21
Question

Question 2(i)

Write Java expression for:

𝑎+𝑏a2+b2\dfrac{|𝑎 + 𝑏|}{\sqrt{a^2 + b^2}}

Answer

The Java expression for the given mathematical expression can be written as:

double result = Math.abs(a + b) / Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));