#include <stdio.h>
#include <limits.h>

unsigned long long ConstructMoney(unsigned long long dollars, unsigned cents)
{
  return dollars * 100 + cents;
}

void PrintWithCommas(unsigned long long n)
{
  char s[sizeof n * CHAR_BIT + 1];
  char *p = s + sizeof s;
  unsigned count = 0;
  *--p = '\0';
  do
  {
    *--p = '0' + n % 10;
    n /= 10;
    if (++count == 3 && n)
    {
      *--p = ',';
      count = 0;
    }
  } while (n);
  printf("%s", p);
}

void PrintMoney(unsigned long long n)
{
  PrintWithCommas(n / 100);
  putchar('.');
  n %= 100;
  putchar('0' + n / 10);
  putchar('0' + n % 10);
}

int main(void)
{
  PrintMoney(ConstructMoney(0, 0)); puts("");
  PrintMoney(ConstructMoney(0, 1)); puts("");
  PrintMoney(ConstructMoney(1, 0)); puts("");
  PrintMoney(ConstructMoney(1, 23)); puts("");
  PrintMoney(ConstructMoney(12, 34)); puts("");
  PrintMoney(ConstructMoney(123, 45)); puts("");
  PrintMoney(ConstructMoney(1234, 56)); puts("");
  PrintMoney(ConstructMoney(12345, 67)); puts("");
  PrintMoney(ConstructMoney(123456, 78)); puts("");
  PrintMoney(ConstructMoney(1234567, 89)); puts("");
  return 0;
}
