I'm writing that in some sort of pseudocode; if you don't understand it, feel free to ask for more details in the comments.
function sumOdd(n)
if n==1 then
return 1
end if
return (sumOdd(n-1))+(n*2-1)
end function
Answer:
Explanation:
BEGIN
DEFINE n,tmp, tmp1 type Integer
n = 0
DISPLAY "Enter a number"
INPUT n
tmp = n + 4
tmp = tmp * 3
tmp = tmp + n
tmp1 = tmp / 2
tmp = tmp1 + 4
tmp = tmp / 2
tmp = tmp - n
DISPLAY tmp
END
So, 5 is intered.
Line 1: num will recieve the integer 5
Line 2: Blank
Line 3: num will recieve 1, wich is the remainer of the division of 5 by 4.
Line 4: will return true, since num is indeed equal to 1.
Line 5: Will print "A"
Line 6: Will return false
Line 7: Gets jumped
Line 8: Will return false
Line 9: Gets jumped
Line 10: Will return false
Line 11: Gets jumped
Line 12: Will return false
Line 13: Gets jumped
The only OUTPUT is "A".
Answer:
False
Explanation:
Foreach is useful when we want to do something for each element rather than repeating something for n times
Answer is False
A relative cell <span>reference is an adjusted cell reference in a copied and pasted formula.</span>