PRF192_-_SP_2023_-_PE_170.webp
hirosi212

PRF192_-_SP_2023_-_PE_170.webp

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
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom