flowchart

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.7: Do While Loops
Problem 2E: (Misc. application) a. Write a program that continuously requests a grade to be entered. If the...
icon
Related questions
Question

Create a flowchart of this pseudocode 

 

// 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

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Flowchart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning