Where Credit Is Due
Programming Assignment
Write a program that accepts input data about a certain (unknown) number of CIS students. A set of input data contains the following information for each student:
Student ID
Number of credits carried during the current semester
The CIS department wishes to know how many credits a typical student takes. Your program should calculate the average number of credits for the department.
The console window should look something like this:
This program will let you enter student data for a group students and when you are finished entering the data, the program will report to you the average number of credits per student.
For each student, enter a student ID and the number of credits the student is taking this semester. When you wish to end, type “END” for the Student ID.
Student ID? 111222333
Number of credits for this student? 15
Student ID? END
The average number of credits for all students entered is 15 credits per student.
Run your program twice, once with no student information entered (number of students = 0), and once with the following sample data: