/* MATHPLAY.CPP PUBLIC DOMAIN version kk3.0 2/3 */
void Mathcalc::Play(void)
{
int iPlay;
do {
Display();
First();
Second();
Guess();
Result();
cprintf("\n\r Try another problem (Y/N)? ");
do {
iPlay = getch();
iPlay = toupper(iPlay);
} while(iPlay != 'Y' && iPlay != 'N'
&& iPlay != '\r' && iPlay != ' ');
} while(iPlay == 'Y' || iPlay == '\r');
}
void Addition::Addition(void)
{
pszTutor =
"In addition we have two values known as ADDENDS.\n\r"
"These two values are added together to arrive\n\r"
"at a value known as the SUM. Let's try addition.\n\r";
pszFirst = "ADDEND #1";
pszSecond = "ADDEND #2";
pszGuess = "What is the SUM?";
}
void Subtraction::Subtraction(void)
{
pszTutor =
"In subtraction, our first value is known as the\n\r"
"MINUEND, and our second value is called the\n\r"
"SUBTRAHEND. The value of the SUBTRAHEND is\n\r"
"subtracted from the value of the MINUEND.\n\r"
"This leaves us with a value called the REMAINDER.";
pszFirst = "MINUEND";
pszSecond = "SUBTRAHEND";
pszGuess = "REMAINDER";
}
void Multiplication::Multiplication(void)
{
pszTutor =
"In multiplication, we call our first value the\n\r"
"MULTIPLICAND. Our second value is known as the\n\r"
"MULTIPLIER. We multiply the MULTIPLICAND by the\n\r"
"MULTIPLIER to arrive at the value called the PRODUCT.\n\r"
"What we are really doing is adding our MULTIPLICAND to\n\r"
"itself the number of times indicated by the MULTIPLIER.\n\r"
"Multiplying is like adding!";
pszFirst = "MULTIPLICAND";
pszSecond = "MULTIPLIER";
pszGuess = "PRODUCT";
}
void Division::Division(void)
{
pszTutor =
"In division, we call the first number the DIVIDEND.\n\r"
"The second number is known as the DIVISOR.\n\r"
"Our answer is called the QUOTIENT.\n\r"
"What we want to know is how many of our DIVISOR will\n\r"
"we be able to get from our DIVIDEND.\n\r"
"Like how many dimes you can get for a dollar.\n\r"
"We subtract DIVISOR from DIVIDEND until nothing is left.\n\r"
"Division is like subtraction!";
pszFirst = "DIVIDEND";
pszSecond = "DIVISOR";
pszGuess = "QUOTIENT";
}
/* end MATHPLAY.CPP 2/3 */
> ] You cannot enter the Underground without a Tolkien..........
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)
|