All pastes #189399 Raw Edit

Unnamed

public text v1 · immutable
·published 2006-10-03 01:35 UTC
rendered paste body
#include <stdio.h>
#include <stdlib.h>

int
main(int argc, char **argv)
{
  int i, j;
  int w, h;
  if (argc != 3)
  {
    printf("Supply two integers.\n");
    return 1;
  }
  w = atoi(argv[1]);
  h = atoi(argv[2]);

  for (i = 0; i < h; i++)
  {
    for (j = 0; j < w; j++)
    {
      printf("% 3d", i*w + j);
    }
    printf("\n");
  }

  return 0;
}
~