PRF192_-_PE01_-_SU_2024_2174.webp
E

PRF192_-_PE01_-_SU_2024_2174.webp

  • Media owner Edward88
  • Ngày thêm
The given file Q2.c already contains statements to input an integer variable named n (n>=0). You should write statements to calculate S by n, S is defined as follows:
S(n) = 1+ 21 +22 + 23 + ... + 2
Notes:
- You can create new functions 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
After processing: S(2) = 1+21+22= 7.00
Output for marking:
OUTPUT:7.00
Question 3:
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
PRF192
Thêm bởi
Edward88
Ngày thêm
Lượt xem
1,726
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRF192_-_PE01_-_SU_2024_2174.webp
File size
118 KB
Dimensions
1920px x 803px

Share this media

Back
Bên trên Bottom