PRF192_-_PE01_-_SU_2025_3994.webp
M

PRF192_-_PE01_-_SU_2025_3994.webp

  • Media owner Maki2001
  • Ngày thêm
Question 3: (2 marks)
Kizspy.me given file Q3.c already contains statements to input data for an integer 1-D array. You
should write statements to calculate the sum of odd numbers in the array if the first
number in the array is odd, otherwise if the first number in the array is even, calculate the
sum of even numbers in the array.
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=5
14729
After processing: the result is 1+7+9=17 (the first number "1" is odd)
Output for marking:
OUTPUT:
17
-Input: n=6
4562717
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom