~learax/csci112-2021-william-culhane

93caa8b886754414bb4f8a821608d139c08140ea — William Culhane 3 years ago 5af494f
program2: Adjust output format
1 files changed, 4 insertions(+), 3 deletions(-)

M programs/program2/program2.c
M programs/program2/program2.c => programs/program2/program2.c +4 -3
@@ 12,7 12,7 @@

typedef struct Courses {
  char code[10];
  char name[50];
  char name[35];
  unsigned int mystery; // TODO What is this? An ID?
  unsigned int seats_total, seats_taken, seats_open;
  char professor[25];


@@ 58,8 58,9 @@ int parse_csv(const char filename[], course_t courses[MAX_COURSES]) {
}

void print_course(course_t course) {
  printf("%-10s %36s\n", course.code, course.name);
  printf("%-3i %-7s %-8s %25s\n\n", course.seats_open, course.weekdays,
  // Numbers are from max size of element + alignment factor
  printf("%-36s %9s\n", course.name, course.code);
  printf("%-3i %-7s %-9s %24s\n\n", course.seats_open, course.weekdays,
         course.time, course.professor);
}