Answer:
The ending value of y is 9.0
Explanation:
Given
x = 9.0;
y=4.0
y =pow(sqrt(x),sqrt(y));
Required
Determine the end value of y
Lines 1 and 2 initialize the values of x and y to be 9.0 and 4.0 respectively.
The instruction on line 3 can then be translated to:
[tex]y =pow(sqrt(9.0),sqrt(4.0));[/tex]
From the hint in the question, we understand that:
[tex]sqrt(a) = \sqrt{a[/tex]
Apply this hint on sqrt(9.0) and sqrt(4.0); this gives:
[tex]sqrt(9.0) = 3.0[/tex]
[tex]sqrt(4.0) = 2.0[/tex]
So, we have:
[tex]y =pow(3.0,2,0);[/tex]
Also, from the hint; we understand that:
[tex]pow(a,b) = a^b[/tex]
When this hint is applies,
[tex]y = pow(3.0,2,0) = 3.0^{2.0}[/tex]
i.e.
[tex]y = 3.0^{2.0}[/tex]
[tex]y = 9.0[/tex]
Hence, the ending value of y is 9.0