< previous page page_222 next page >

Page 222
Print Message Indicating Status
Print average
IF average >= 60.0
    Print Passing
    IF average < 70.0
        Print  but marginal
    Print .
ELSE
    Print Failing.

Module Structure Chart:
0222-01.gif
Variable
NameData TypeDescription
averagefloatAverage of three test scores
studentIDintStudent's identification number
test1intScore for first test
test2intScore for second test
test3intScore for third test
dataOKBooleanTRUE if data is correct

//******************************************************************
// Notices program
// This program determines (1) a student's average based on three
// test scores and (2) the student's passing/failing status
//******************************************************************
#include <iostream.h>
#include <iomanip.h>    // For setprecision()

 
< previous page page_222 next page >