void display_info(Course courses[], Student students[],
  int courses_actual, int students_actual)
{
  int choice;

  do
  {
    choice = get_choice();
    switch (choice)
    {
      case 0: break;
      case 1:
        find_CRN(courses, students, courses_actual, students_actual);
        break;
      case 2: find_subject(courses, courses_actual); break;
      case 3:
        add_course(courses, students, courses_actual, students_actual);
        break;
      case 4:
        remove_course(students, students_actual);
        break;
      default:
        printf("Your choice is outside the acceptable range.  "
          "Please try again.\n");
    } // switch (choice)
  } while (choice != 0);
} // display_info()
Пример #2
0
void display_info(char **subjects, char **courses, int *CRNs, int count)
{
    int choice;

    do
    {
        choice = get_choice();

        if(choice == 1)
            find_CRN(subjects, courses, CRNs, count);
        else if(choice == 2)
            find_subject(subjects, courses, CRNs, count);

    } while(choice != 0);

} // display_info()