You are on page 1of 5

/*

Print January */ printf(" Su Mo Tu We Th Fr Sa\n"); /* prints spaces before the first date is printed */ for (i = 0; i < weekDay; i++) { printf(" "); } /* prints the dates */ for (i = 1; i <= 31; i++) { printf("%3d", i); if (!((i+weekDay) % DAYS_IN_WEEK)) printf("\n"); } printf("\n"); /* Print February */ int februaryStart = (weekDay + 31) % 7; printf("\n"); // To make space for the next month printf(" Su Mo Tu We Th Fr Sa\n"); /* prints spaces before the first date is printed */ for (i = 0; i < februaryStart; i++) { printf(" "); }

/* prints the dates */ for (i = 1; i <= 28; i++) { printf("%3d", i); if (!((i + februaryStart) % DAYS_IN_WEEK)) printf("\n"); } printf("\n");

/* Print January */ printf(" Su Mo Tu We Th Fr Sa\n"); /* prints spaces before the first date is printed */ for (i = 0; i < weekDay; i++) { printf(" "); } /* prints the dates */ for (i = 1; i <= 31; i++) { printf("%3d", i); if (!((i+weekDay) % DAYS_IN_WEEK)) printf("\n"); } printf("\n"); /* Print February */ int februaryStart = (weekDay + 31) % 7; printf("\n"); // To make space for the next month printf(" Su Mo Tu We Th Fr Sa\n"); /* prints spaces before the first date is printed */ for (i = 0; i < februaryStart; i++) { printf(" "); }

1 Word-for-word identical

/* prints the dates */ for (i = 1; i <= 28; i++) { printf("%3d", i); if (!((i + februaryStart) % DAYS_IN_WEEK)) printf("\n"); } printf("\n");

/* Print January */ printf(" Su Mo Tu We Th Fr Sa\n"); /* prints spaces before the first date is printed */ for (i = 0; i < weekDay; i++) { printf(" "); } /* prints the dates */ for (i = 1; i <= 31; i++) { printf("%3d", i); if (!((i+weekDay) % DAYS_IN_WEEK)) printf("\n"); } printf("\n"); /* Print February */ int februaryStart = (weekDay + 31) % 7; printf("\n"); // To make space for the next month printf(" Su Mo Tu We Th Fr Sa\n"); /* prints spaces before the first date is printed */ for (i = 0; i < februaryStart; i++) { printf(" "); }

1 Word-for-word identical 2 Word-for-word identical

/* prints the dates */ for (i = 1; i <= 28; i++) { printf("%3d", i); if (!((i + februaryStart) % DAYS_IN_WEEK)) printf("\n"); } printf("\n");

/* Print January */ printf(" Su Mo Tu We Th Fr Sa\n"); /* prints spaces before the first date is printed */ for (i = 0; i < weekDay; i++) { printf(" "); } /* prints the dates */ for (i = 1; i <= 31; i++) { printf("%3d", i); if (!((i+weekDay) % DAYS_IN_WEEK)) printf("\n"); } printf("\n"); /* Print February */ int februaryStart = (weekDay + 31) % 7; printf("\n"); // To make space for the next month printf(" Su Mo Tu We Th Fr Sa\n"); /* prints spaces before the first date is printed */ for (i = 0; i < februaryStart; i++) { printf(" "); }

1 Word-for-word identical 2 Word-for-word identical 3 Word-for-word identical

/* prints the dates */ for (i = 1; i <= 28; i++) { printf("%3d", i); if (!((i + februaryStart) % DAYS_IN_WEEK)) printf("\n"); } printf("\n");

/* Print January */ printf(" Su Mo Tu We Th Fr Sa\n"); 1 /* prints spaces before the first date is printed */ for (i = 0; i < weekDay; i++) { 2 printf(" "); } /* prints the dates */ for (i = 1; i <= 31; i++) { printf("%3d", i); 3 if (!((i+weekDay) % DAYS_IN_WEEK)) printf("\n"); } printf("\n"); /* Print February */ int februaryStart = (weekDay + 31) % 7; printf("\n"); // To make space for the next month printf(" Su Mo Tu We Th Fr Sa\n"); 1 /* prints spaces before the first date is printed */ for (i = 0; i < februaryStart; i++) { 2 printf(" "); }

1 Word-for-word identical 2 Word-for-word identical 3 Word-for-word identical 4 Unique Code

/* prints the dates */ for (i = 1; i <= 28; i++) { printf("%3d", i); if (!((i + februaryStart) % DAYS_IN_WEEK)) 3 printf("\n"); } printf("\n");