Professional Documents
Culture Documents
64f1eaa426423c287faa5b10 PRF192 Sum2024 Workshop3 Question
64f1eaa426423c287faa5b10 PRF192 Sum2024 Workshop3 Question
1
Q2: Print out 5-digit Palindrome numbers (from 3000 - 7000). A
Palindrome number is a number written forward or backward and still only
produces one number. (In ra các số Palindrome có 5 chữ số (từ 3000 - 7000). Số
Palindrome là số viết xuôi hay viết ngược vẫn chỉ cho ra một số.)
Q3: Write a program that inputs a positive integer and outputs the
opposite number (Viết một chương trình nhập vào 1 số nguyên dương, xuất ra
số ngược lại)
For example: Input 123, output 321
Print the results as follows:
2
Q4: Write a Menu program using switch ... case to represent the image:
Print the results as follows:
3
Q5: Write a program to input 3 float real number values, then find the smallest
value among those 3 numbers (Viết chương trình nhập vào 3 giá trị kiểu số thực
float, sau đó tìm giá trị nhỏ nhất trong 3 số đó):
- Use pointer to write the input function as follows: void input(float *a,
float *b, float *c);
- Write a compare function to find the smallest value as follows: float
compare(float a, float b, float c);
Call the above functions and display the following information:
4
Q6: Enter M, N from the keyboard. Print out the rectangle as follows
(Nhập M, N từ bàn phím. In ra hình chữ nhật như sau):