2 of 3 Paper No: 1
===
Question 1 (2 marks)
The given file Q1.c already contains statements to input an integer variable named n (n>0). You should write statements so that print out the largest digit of n.
Notes:
- Do not edit given statements in the main function.
- You can create new functions if you see it is necessary.
Sample input and output:
Input: n = 3598
After processing: 9
Output for marking:
OUTPUT:
9
Question 2:
(3 marks)
The given file Q2.c already contains statements to input data for an integer variable named n. You should write statements to calculate the product of its non-zero digits.
Notes:
+ 100%
Zoom
Close