PRF192_-_PE02_-_SU_2024_2178.webp
V

PRF192_-_PE02_-_SU_2024_2178.webp

Zoom
-Input: n = 5
Output for marking:
OUTPUT:0
-Input: n = 6
Output for marking:
OUTPUT:1
Question 2:
(3 marks)
The given file Q2.c already contains statements to input an integer variable named n. You should write statements to sum the primes less than n (the primes start from 2)
Notes:
- You can create new functions if you see it is necessary.
- Do not edit given statements in the main function.
Sample input and output:
Input: n = 10
After processing: result = 2+ 3+5 + 7 = 17
Output for marking:
OUTPUT:17
Question 3:
(2 marks)
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRF192_-_PE02_-_SU_2024_2178.webp
File size
175.5 KB
Dimensions
2560px x 1269px

Share this media

Back
Bên trên Bottom