Datastrukturer og Dataabstraktion - slide 20 : 36 |
int main(void) { date calendar[DATE_MAX]; char ignore; date first_date = {tuesday, 17, 11, 2015}, last_date = {thursday, 17, 11, 2016}, current_date; int i = 0, j = 0; current_date = first_date; while (date_before(current_date, last_date)){ calendar[i] = current_date; current_date = tomorrow(current_date); i++; } for (j = 0; j < i; j++){ if (j % 20 == 0) { printf("More? - touch the enter key: "); scanf("%c", &ignore); } prnt_date(calendar[j]); } }