While $loop=1 ;Calculations : Input Data for Students in Each Year/Determines if program is overlimit for year $student1 = InputBox("The # of Students in Year 1", "Enter number of students in Year 1: ", "") If $student1 > $MaxEnrollment Then MsgBox(0,"Max Enrollment","Number of students enrolled in this program is overlimit for Year 1") EndIf $student2 = InputBox("The # of Students in Year 2", "Enter number of students in Year 2: ", "") If $student2 > $MaxEnrollment Then MsgBox(0,"Max Enrollment","Number of students enrolled in this program is overlimit for Year 2") EndIf $student3 = InputBox("The # of Students in Year 3", "Enter number of students in Year 3: ", "") If $student3 > $MaxEnrollment Then MsgBox(0,"Max Enrollment","Number of students enrolled in this program is overlimit for Year 3") EndIf $student4 = InputBox("The # of Students in Year 4", "Enter number of students in Year 4: ", "") If $student4 > $MaxEnrollment Then MsgBox(0,"Max Enrollment","Number of students enrolled in this program is overlimit for Year 4") EndIf $student5 = InputBox("The # of Students in Year 5", "Number of students enrolled in this program is overlimit for Year 5: ", "") If $student5 > $MaxEnrollment Then MsgBox(0,"Max Enrollment","Enrolmment is overlimit for Year 5") EndIf $student6 = InputBox("The # of Students in Year 6", "Enter number of students in Year 6: ", "") If $student6 > $MaxEnrollment Then MsgBox(0,"Max Enrollment","Number of students enrolled in this program is overlimit for Year 6") EndIf ;Calculations : Total Number of Students Combined for Each Year $tstudent = $student1 + $student2 + $student3 +$student4 +$student5 +$student6 ;Calculations : Percentage Calculated For Enrollment for Each Year $per1 = StringLeft(($student1 / 80)*100,4) $per2 = StringLeft(($student2 / 80)*100,4) $per3 = StringLeft(($student3 / 80)*100,4) $per4 = StringLeft(($student4 / 80)*100,4) $per5 = StringLeft(($student5 / 80)*100,4) $per6 = StringLeft(($student6 / 80)*100,4) ;Display Results on Report $return1 = msgbox(3,"Enrollment Data Report", "The # of Students in Year 1: " & $student1 & _ @CRLF & "Enrollment % for Year 1 : " & $per1 & _ @CRLF & _ @CRLF & "The # of Students in Year 2: " & $student2 & _ @CRLF & "Enrollment % for Year 2 : " & $per2 & _ @CRLF & _ @CRLF & "The # of Students in Year 3: " & $student3 & _ @CRLF & "Enrollment % for Year 3 : " & $per3 & _ @CRLF & _ @CRLF & "The # of Students in Year 4: " & $student4 & _ @CRLF & "Enrollment % for Year 4 : " & $per4 & _ @CRLF & _ @CRLF & "The # of Students in Year 5 " & $student5 & _ @CRLF & "Enrollment % for Year 5 : " & $per5 & _ @CRLF & _ @CRLF & "The # of Students in Year 6 " & $student6 & _ @CRLF & "Enrollment % for Year 6 : " & $per6 & _ @CRLF & _ @CRLF & _ @CRLF & "Total number of students in degree: " & $tstudent & _ @CRLF & _ @CRLF & _ @CRLF & "Review the results. Are they correct?")