#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "GrWin.h"

int main()
{
float x,y;
int z;

GWopen(0);
GWindow(0.0, 0.0, 200.0, 200.0);

z=0;
for(y=20.0; y<180.0; y=y+20){
for(x=10.0; x<170.0; x=x+20)
{
GWsrect(x, y, x+10.0, y+10.0, z);
}
printf("\n");

}
return 0;
}

このプログラムを四角を描くたびに色を変えるには
どうすればいいんでしょうか??わかる人教えて下さい