Design an algorithm to input student records; each record contains a student name, registration code, and credits field. A registration code of 1 indicates that the student is a resident. A registration code of 2 indicates that the student is a nonresident. A value of 12 or more in the credits field indicates full-time (FT) status. A lesser value indicates part-time (PT) status. Output a detail line for each student containing the student's name and a tuition amount computed as follow:
- FT resident $1200.00 flat fee
- PT resident $ 100 per credit
- FT nonresident $2760.00 flat fee
- PT nonresident $230.00 per credit
Five total lines are also to be output as follows:
- Total number of FT resident students
- Total number of PT resident students
- Total number of FT nonresident students
- Total number of PT nonresident students
- Total number of students
Use automatic end-of-file logic to signal the end of the input.