PRF192_-_SP_2025_-_DN_-_PE_3480.webp
G

PRF192_-_SP_2025_-_DN_-_PE_3480.webp

Kizspy.me
Question 4:
(1 mark, file to be edited: Q4.c)
Write a function that takes two numbers as arguments and returns their greatest common divisor
(GCD). Then, call this function from main() and print the result.
Below is an example of how the program will run:
INPUT:
21 35
OUTPUT:
GCD: 7
Question 5:
(1 mark, file to be edited: Q5.c)
Users are required to enter two integer numbers 'x' and 'y' (x <y) using the keyboard (STDIN).
The system displays the sum value of the odd numbers from x to y (x<=odd numbers<=y).
Below is an example of how the program will run:
Enter the value 5 for 'x' and 15 for 'y'.
Input:
15
Output: 60
Press any key to continue....
Question 6:
(1 mark, file to be edited: Q6.c)
Users are required to enter an integer number to define rows of the half pyramid of alphabets
(rows > 0).
Zoom
+100%
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom