Module: (C++) Loop statement with condition - while

Problem

11
/21

Minimum and maximum digits

Problem

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