Problem Statement
Write a C program that finds the largest and smallest digits in a given integer.
Your program should read an integer from standard input and output the largest and smallest digits present in that number. For negative numbers, ignore the negative sign and consider only the digits.
For example, if the input is 5283, the largest digit is 8 and the smallest is 2. If the input is -741, the largest digit is 7 and the smallest is 1.
Special cases:
- If the number is 0, both largest and smallest digits are 0
- If all digits are the same, both largest and smallest will be that digit