#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
int main(void) {
int num = 213859;
char str[6];
sprintf(str,"%d", num);
int size = strlen(str);
srand((unsigned int)time(NULL));
int digit2, digit1 = str[rand() % (size - 1)] - '0';
do {
digit2 = str[rand() % (size - 1)] - '0';
} while (digit1 == digit2);
printf("%d %d", digit1, digit2);
return 0;
}
/*
run:
8 2
*/