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));
Get the Bright Tutorials app Stuck on a question? Ask Bright Buddy โ€” your AI tutor โ€” for step-by-step help in the app.