var name, course1, course2, course3, course4 : string
var mark1, mark2, mark3, mark4, sum : real
var creditsEarned : int
creditsEarned := 0
sum := 0
put "What is your full name?"
get name : *
put "What are four courses you take?"
get course1, course2, course3, course4
put "What are the marks you have recieved for those courses?"
get mark1, mark2, mark3, mark4
sum := sum + mark1 + mark2 + mark3 + mark4
if mark1 > 50 then
creditsEarned := creditsEarned + 1
elsif mark2 > 50 then
creditsEarned := creditsEarned + 1
elsif mark3 > 50 then
creditsEarned := creditsEarned + 1
elsif mark4 > 50 then
creditsEarned := creditsEarned + 1
end if
put "Credits Earned: ", creditsEarned
put ""
put "" : 3, "Academic School"
put ""
put "Name: ", name
put ""
put "Course:" : 15, "Mark:"
put ""
put course1 : 15, mark1
put ""
put course2 : 15, mark2
put ""
put course3 : 15, mark3
put ""
put course4 : 15, mark4
put ""
put "Average: ", sum / 4 : 0 : 1
|