/* a7-4-2.c */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>

#define N 5
    
int main(void)
{
	char *who[N]   = {"有賀君", "松田君", "佐藤君", "永井君", "関東君"};
	char *when[N]  = {"朝早く", "夏休み", "食事中", "放課後", "風呂あがり"};
	char *where[N] = {"学校", "バイト先", "電車の中", "駅のホーム", "コンビニ"};
	char *what[N]  = {"宿題をした", "笑い転げた", "泣いた", 
	                  "喧嘩をした", "走った"};
	int i1, i2, i3, i4;
    
	srand((unsigned)time(NULL));
	i1 = rand() % N;
	i2 = rand() % N;
	i3 = rand() % N;
	i4 = rand() % N;

	printf("%sが%s%sで%s\n", who[i1], when[i2], where[i3], what[i4]);

	return 0;
}
