In: Computer Science
// This pseudocode is intended to determine whether students have
// passed or failed a course; student needs to average 60 or
// more on two tests.
start
Declarations
num firstTest
num secondTest
num average
num PASSING = 60
output "Enter first score or 0 to quit "
input firstTest
while firstTest not equal to 0
output "Enter second score or 0 to quit"
input secondTest
average = (firstTest + secondTest) / 2
output "Average is ", average misspelled “t” for the word output
if average >= PASSING then
output "Pass"
else
output "Fail"
endif
endwhile
stop
// This pseudocode is intended to determine whether students
have
// passed or failed a course; student needs to average 60 or
// more on two tests.
start
Declarations
   num firstTest
   num secondTest
   num average
   num PASSING = 60
  
   // input of first test score
   output "Enter first score or 0 to quit "
   input firstTest
  
   // loop that continues until the user enters 0 as
first test score
   while firstTest not equal to 0
      
       // input of second test score
       output "Enter second score or 0 to
quit"
       input secondTest
      
       // if second test score is not 0
then calculate and display average and display if the student
passed or failed
       if secondTest is not equal to
0
          
           // calculate and
display average
           average =
(firstTest + secondTest) / 2
           output "Average
is ", average misspelled "t" for the word output
          
           // determine if
the student passed or failed
           if average >=
PASSING then
          
    output "Pass"
           else
          
    output "Fail"
           end if
          
           // input of
firstTest score
           output "Enter
first score or 0 to quit "
           input
firstTest  
          
       else // if secondTest is 0, set
firstTest to 0 to end the program
           firstTest =
0
       end if  
      
   end while
stop