OUTPUT:0.00
-Input: 4 5 6
Output for marking:
OUTPUT:
5.15
Question 2:
(3 marks)
The given file Q2.c already contains statements to input an integer variable n (n ≥0). You should write 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.
Zoom
+ 100%
Close