
/* test of structs and typedef's in pure c */

#include <stdio.h>
int main(void);
int main(void)
{	
	/* declarations */
	int i;

	typedef int km_per_hour;
	typedef int points;
	
	km_per_hour current_speed;
	points high_score;
	
	typedef struct {
		int height;
		int width;
		int depth;
	} cube_t;
	
	cube_t rubix[2];
	/* end of declarations */
	
	current_speed=120;
	high_score=999;
	
	rubix[0].height=5;
	rubix[0].width=12;
	rubix[0].depth=9;
	
	rubix[1].height=6;
	rubix[1].width=13;
	rubix[1].depth=10;

	for(i=0;i<2;i++) {
		printf("height=%d\n",rubix[i].height);
		printf("width=%d\n",rubix[i].width);
		printf("depth=%d\n",rubix[i].depth);
	}
	
	printf("Current speed=%d\n",current_speed);
	printf("High score=%d",high_score);
	
	getchar();
	return(0);
}
