
char fraction[30];
snprintf(fraction, sizeof(fraction), "%d/%d", numerator, denominator);

