Răspuns:
#include <iostream>
#include<conio.h>
using namespace std;
int main() {
int n, m, key;
srand(time(NULL));
while (1) {
key = _getch();
key = toupper(key);
if (key != 'S') {
n = 1 + rand() % 6;
m = 1 + rand() % 6;
cout << n << " " << m << endl;
}
else
break;
}
}