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