Question 4:
(1 mark, file to be edited: Q4.c)
Users are required to enter an integer number to define the "row" of the palindrome triangle pattern (row > 0)
Program prints out the palindrome triangle pattern.
Below is an example of how the program will run.
For example, enter 6 for "row":
6
OUTPUT:
ABA
ABCBA
ABCDCBA
ABCDEDCBA
ABCDEFEDCBA
Press any key to continue
Question 5:
(1 mark, file to be edited: Q5.c)
The program allows the user to input an integer array of 'n' elements. With 'n' and the value of the
elements entered from the keyboard.
The program prints to the screen the elements are arranged in ascending order in the order of even numbers first, odd numbers later.
An example of how the program runs is as follows:
Enter: n = 6; array = {6, 9, 8, 2, 7, 3}
Zoom
+ 100%
Close