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:
- 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:
Enter n= 7013
After processing: result = 7*1*3=21
Output for marking:
Processing:
OUTPUT:21
Zoom
+ 100%
Close