PRF192_-_PE_-_SU_2024_-_s_13_2162.webp
golden_swallow

PRF192_-_PE_-_SU_2024_-_s_13_2162.webp

Press any кеу
Question 10:
(1 mark, file to be edited: Q10.c)
The program allows the user to enter an array of n integers from the keyboard.
Find and print the sum of the values of the perfect numbers in the input array. If there is no perfect number in the array, print the message: "There is no perfect number among the n elements of the array".
Knowing that a perfect number is a number whose sum of its divisors is equal to itself.
Below is an example:
Cas
e1
5
9 6 20 28 15
OUTPUT:
34
Press any key to continue
5
Cas e 2
5 7 2 10 4
OUTPUT:
There is no perfect number among the 5 elements of the array
Press any key to continue
Zoom
88%
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRF192_-_PE_-_SU_2024_-_s_13_2162.webp
File size
169.9 KB
Dimensions
1920px x 973px

Share this media

Back
Bên trên Bottom