#include "stdio.h"

struct date
	{
	char	month[10];
	int	day;
	int	year;
	};

struct	record
	{
	char	name[80];
	double	pay;
	date	DOB;
	};

record	TheRecords[100] = { 	{"bill",	42000,	{"July",	23, 	1978} },
				{"Fred",	12000,	{"May",		19, 	1956} },
				{"Tom",		76000,	{"April",	5,	1932} },
				{"Sam",		123000, {"March",	12, 	1981} },
				{"Carlos",	56000,	{"June",	25, 	1965} },
				{"Ali",		32500,	{"Decamber",	19, 	1987} },
				{"Chen",	26750,	{"October",	23, 	1977} },
				{"Gary",	76800,	{"May",		8,	1983} },
				{"Anna",	145500, {"August",	14, 	1964} } };

void printrecords(record	r[100], int n)
	{
	int	i;

	for (i = 0; i < n; i++)
		printf("Name: %-10s, DOB: %10s/%2d/%2d is payed $%8.2lf \n",	r[i].name, 
										r[i].DOB.month, 
										r[i].DOB.day,
										r[i].DOB.year,
										r[i].pay);
	}

void get_new_record(int i)
	{
	printf("enter person's name\n");
	scanf("%s",TheRecords[i].name);

	printf("enter person's pay\n");
	scanf("%lf", &(TheRecords[i].pay) );

	printf("enter person's DOB month\n");
	scanf("%s",TheRecords[i].DOB.month);

	printf("enter person's DOB day\n");
	scanf("%d", &(TheRecords[i].DOB.day) );

	printf("enter person's DOB year\n");
	scanf("%d", &(TheRecords[i].DOB.year) );
	}



int main()
	{

	printrecords(TheRecords,9);

	get_new_record(9);

	printrecords(TheRecords,10);

	return 0;
	}

