Quote:
Is there a way to accomplish this?
Yes, use the count of the items to decide how many of each letter you need to display. So rather than trying to print the complete line in one go, break it down into its separate parts. You can then create a function that prints the letters, something like:
void letters(char letter, int count, char* suffix)
{
while (count-- > 0)
{
printf("%c", letter);
}
printf(" %s ", suffix);
You then call it like:
letters('L', 3, "loonies");
which will prodiuce:
LLL loonies
ready to be followed by the next set ...