Qus 5

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Q5.

From the answer group below, select the correct answer to be inserted in _______ in
the program.

The function calc receives the positive real numbers x and y, and returns the result of the
calculation of √ x2 + y2. The function pow that the function calc uses receives the positive
real number a as its first argument and the real number b as its second argument, and returns
the real type value of ab (a to the power of b).

[Program]
○ real: calc(real: x, real: y)
return _______

Answer group
a) (pow(x, 2) + pow(y, 2)) ÷ pow(2, 0.5)
b) (pow(x, 2) + pow(y, 2)) ÷ pow(x, y)
c) pow(2, pow(x, 0.5)) + pow(2, pow(y, 0.5))
d) pow(pow(pow(2, x), y), 0.5)
e) pow(pow(x, 2) + pow(y, 2), 0.5)
f) pow(x, 2) × pow(y, 2) ÷ pow(x, y)
g) pow(x, y) ÷ pow(2, 0.5)

-8-

You might also like