Язык СИ:
#include<stdio.h>
#include<stdlib.h>
#include<float.h>
#include<time.h>
int main(){
srand(time(0));
const long double cbc=64.0L-FLT_EPSILON;
unsigned short int r1=cbc/RAND_MAX*rand(),
r2=cbc/RAND_MAX*rand();
printf("R1: %c%c\n",65+r1%8,49+r1/8);
printf("R2: %c%c\n",65+r2%8,49+r2/8);
printf("%s\n",r1%8==r2%8 || r1/8==r2/8?"yes":"no");
return 0;
}
Алфавит системы счисления будет иметь вид
0 1 2 3 4 5 6 7 8 9 A B C D E
следующие 30 чисел
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E
X = 49. Программа обработает его и выдаст "94". Сумма цифр 4 + 9 = 9 + 4 = 13.