CIS22A - Fall 2019 - Lab Exercise 11

due Wednesday, 12/4 8:30 am

Lab exercises are not accepted late.

Put your name, Lab Exercise 11, and compiler and the operating system used in a comment at the top of your program. Email only your source code. Your source code should be sent as an attachment (with the name ex11.cpp).  Use "Ex11" as the subject of your email submission

Program Requirements

  1. Read in a copy of the Assignment 6 student data file.  It has exactly 50 records.  Store the student IDs (column 1 in the file) into an int array.
  2. Sort the array in ascending order.  
  3. Print the first 5 and last 5 elements of the student ID array.
  4. Write a search function to demonstrate the 3 searches shown below.
  5. Your solution should contain at least 4 functions in addition to main.

Program output - your output should look like this

00372859
00418467
01751459
02272043
02910836
90726270
96765629
96775969
97895255
98955447
Enter a student ID to search for. (0 to exit) 04746972
4746972 is  a valid student ID.
Enter a student ID to search for. (0 to exit) 418467
418467 is  a valid student ID.
Enter a student ID to search for. (0 to exit) 13290357
13290357 is not a valid student ID.
Enter a student ID to search for. (0 to exit) 0