I am Iterating over some counters in C to print the results on a single line separated like this 012, 013, 014, etc...
My code comes to an end based on some conditions and it's being corrected by a bot.
how can i stop printing the , after the last value of my code.
the idea s to get a 3 digit number with only unique digits and in ascending order
ending with 789;
My function goes as follows:
void my_print_comb(void){
for(int i = 47; i++ < 57 ; ){
for(int j = 48; j++ < 57 ; ){
for(int k = 49; k++ < 57 ; ){
if( i != j && i != k && j != k){
while( i < j && j < k){
char a = i, b = j, c = k;
my_putchar(a);
my_putchar(b);
my_putchar(c);
my_putchar(',');
my_putchar(' ');
break;
}
}
}
}
}
}