Integer6. A two-digit number is given. Output first its left digit (tens), and then its right digit (units). To find the tens, use the integer division operation, to find the units - the operation of taking the remainder of the division.

Solution in Python 3:

import random

N = random.randrange(10,100)
print("N = ", N)
print("Tens: ", int(N/10))
print("Units: ", N%10)

Solution in C++:

#include <iostream>
using namespace std;
int main(){
int n, f, s;
cout << "Enter N: ";
cin >> n;
f = int(n/10);
s = n%10;
cout << "Tens: " << f << endl;
cout << "Units: " << s;
return 0;
}