SOURCE FILE: checksLev1.cpp
#include <iostream>
using namespace std ;
/* function prototype */
int GetDim (void) ;
/* return a positive value from the user */
/* function prototype */
void MakePattern(int the_width, int the_height) ;
/* write a checker pattern to the screen,
the_width checks wide and the_height checks high. */
int main (void)
{
int width, height ;
width = GetDim() ; // We don't need to write virtually the same
height = GetDim() ; // code twice - instead we call the function twice.
MakePattern(width, height) ;
return 0;
}
/* function definition */
int GetDim()
{
/* STUB CODE */
cout << "GetDim runs to get a dimension.\n" ;
return 8 ;
}
/* function definition */
void MakePattern(int the_width, int the_height)
{
/* STUB CODE */
cout << "MakePattern runs to make a " << the_width
<< " by " << the_height << " check pattern.\n" ;
}