Answer:
The programming language is not stated. However, I'll answer this question using Python programming language.
The program uses no comments; find explanation below
i = 0
while not (i == 4):
print("Sample Run: #"+str(i+1))
Major = input("Major: ")
GPA = float(input("GPA: "))
if not (Major.upper() == "SWE" or Major.upper() == "IT" or Major.upper() == "CGDD" or Major.upper() == "CS"):
if GPA >= 3.50:
print("Great GPA, but apply using the regular application")
else:
print("Talk to one of our advisors about whether grad school is for you")
if (Major.upper() == "SWE" or Major.upper() == "IT" or Major.upper() == "CGDD" or Major.upper() == "CS"):
if GPA >= 3.50:
print("You can FastTrack.")
else:
print("Correct major, but GPA needs to be higher.")
i = i + 1
Explanation:
Line 1 of the program initializes the sample run to 0
Line 2 checks if sample run is up to 4;
If yes, the program stops execution else, it's continues execution on the next line
Line 3 displays the current sample run
Line 4 and 5 prompts user for Major and GPA respectively
Line 6 to 10 checks is major is not one of CS, SWE, IT, and CGDD.
If major is not one of those 4 and GPA is at least 3.5, the system displays "Great GPA, but apply using the regular application"
If major is not one of those 4 and GPA is less than 3.5, the system displays "Talk to one of our advisors about whether grad school is for you"
Line 11 to 15 checks is major is one of CS, SWE, IT, and CGDD.
If major is one of those 4 and GPA is at least 3.5, the system displays "You can Fastrack"
If major is one of those 4 and GPA is less than 3.5, the system displays "Correct major, but GPA needs to be higher."
The last line of the program iterates to the next sample run