Source Code for Lab #4
//
// LAB041.cpp. This program reads two SAT verbal scores
// (between 0 and 800) for a student and prints the larger
//
#include <iostream.h>
int main(void)
{
void instructions(void); // prototypes
int ReadScore(void);
int OutOfRange(int score);
int max(int x, int y);
int score1, // SAT verbal score #1
score2; // SAT verbal score #2
// call function instructions to print instructions
// obtain a value for score1 by calling ReadScore
// if score1 is out of range
// print an error message
// else
// obtain a value for score2 by calling ReadScore
// if score2 is out of range
// print an error message
// else
// using function max print larger score
return 0;
}
//
// Function to print instructions on what the program does
//
void instructions(void)
{
cout << "This program interactively reads two SAT\n";
cout << "verbal scores and prints the larger\n\n";
}
//
// Function to read a score interactively
//
int ReadScore(void)
{
// stub for ReadScore
}
//
// Function to return TRUE (1) if the SAT score is out of
// range, FALSE (0) otherwise. Range: 0-800
//
int OutOfRange(int score)
{
// stub for OutOfRange
}
//
// Function to return maximum of two integer parameters
//
int max(int x, int y)
{
// stub for max
}