jeudi 7 septembre 2017

IMPORTANTHELP!! Ranges in Pseudocoding

You are to create a program which the University of Texas will use in their Admissions department. The program will ask for a student's name, major and grade point average. The program should display those three items back to the user along with "Dean's List" if the student's GPA is above 3.5, "Academic Probation" if the grade point average is below 2.0, and no extra message if the grade point average is between 2.0 and 3.5 inclusive.

Hint:The program will display 3 or 4 lines as its output. It will display at least 3, regardless. The 4th line, if necessary, will be either "Dean's List" or "Academic Probation"

my code (was wrong according to the profs.)

    Class Student
main()
         //declarations
         string studentname
         string major
         num gpa

input studentname
input major
input gpa
     if gpa > 3.5 then
     output “Dean’s List” studentname, major, gpa, 
     EndIf
If gpa => 2.0 AND <= 3.5 then
Output studentname, major, gpa 
End if
            If gpa <2.0 then
            Output “Academic Probation” studentname, major, gpa
            Endif
return
endClass




Aucun commentaire:

Enregistrer un commentaire