WAP to enter any number and print the largest and the smallest digit present in that number by using java
Answers
Answered by
1
Answer:
Given a number N. The task is to find the largest and the smallest digit of the number.
Examples :
Input : N = 2346
Output : 6 2
6 is the largest digit and 2 is samllest
Input : N = 5
Output : 5 5
Similar questions