(3 marks)
ne given file Q2.c already contains statements to input data for an integer variable named n (n>=1). You should write statements to calculate expression value is defined as follows:
1
S(n)1+-+35(n-1)+n
Notes:
- You can create new function(s) if you see it is necessary.
- Do not edit given statements in the main function.
- The output value is formatted in two decimal places
Sample input and output:
-Input: n = 2
Output for marking:
OUTPUT:1.33
-Input: n = 3
Output for marking:
OUTPUT:1.53
Zoom
+ 88%
Close