void printi(int val);

int main()
{
  int i, j, sum = 0;

  i = 0;
  do {
    j = 0;
    while (j < 10) {
      sum += i * 10 + j;
      j++;
    }
    i++;
    printi(i);
    printi(j);
    printi(sum);
  } while (i < 10);

  printi(i);
  printi(j);
  printi(sum);

  return 0;
}
