PRF192_-_PE_-_SU_2023_-_1_HCM_Slot_1_278.webp
Thanh Tú1

PRF192_-_PE_-_SU_2023_-_1_HCM_Slot_1_278.webp

2 of 3 Paper No: 1
The given file Q1.c already contains statements to input data for the three integer variables named a, b,and c. You should write statements so that print out the maximum number in three numbers.
Notes:
- Do not edit given statements in the main function.
- You can create new functions if you see it is necessary.
Sample input and output:
Input: a = 3, b = 7, c = 6
Output for marking:OUTPUT:
7
Question 2:
(3 marks)
The given file Q2.c already contains statements to input data for an integer variable named n. You should write statements to calculate the following expression value:
S(n)=12+22+32+...+n²
Notes:- Do not edit given statements in the main function.
- You can create new functions if you see it is necessary.
Sample input and output:
Input: n=3 After processing: S(3) = (1+2+3)=1+4+9=14
Output for marking:
OUTPUT:14
Question 3:
(2 marks)
The given file Q3.c already contains statements to input data for the integer 1-D array and an integer variable named x. You should write statements to replace the elements equal to x in the array with the value 0.
+ 80%
Zoom
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRF192_-_PE_-_SU_2023_-_1_HCM_Slot_1_278.webp
File size
58.7 KB
Dimensions
1920px x 1009px

Share this media

Back
Bên trên Bottom