Loop statement with condition - while




Task
Time limit: 1000 ms,
Memory limit: 256 Mb

Given a positive integer N. Print its maximum digit in the first line, its minimum digit in the second line

Input: integer N > 0
Output: print two numbers, one per line
The first line contains the maximum digit of the number N
In the second line - the minimum digit of the number N

Examples
Input Output
1 21345 5
1

Prohibited statements:list;[;find;index

Auto CHOOSE THE PROGRAMMING NECESSARY LANGUAGE!
Attach the program source file:
or enter the source code in the language:

Rules for designing programs and a list of errors during automatic task verification
           

Results: