Write Java expression for:

ICSE Class 10 Computer Applications PYQ · 2024 Paper · Section A

2(i)1 Mark · 2024 · Section A · 2024 Paper

Write Java expression for:

$\frac{|𝑎 + 𝑏|}{\sqrt{a^2 + b^2}}$

Show SolutionHide Solution↓

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));
← Previous questionNext question →

Browse the free Computer Applications sample bank