void printi(int val);

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

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

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

  return 0;
}
