statements to calculate expression value:
S(n)=1+3+5+....+(2*n + 1)
Notes:
- You can create new function(s) if you see it is necessary.
- Do not edit given statements in the main function.
Sample input and output:
Input: n = 3
After processing: S(3) = 16
Output for marking:
OUTPUT:
16
Question 3:
(2 marks)
Zoom
+ 100%
FUO
Close