You are on page 1of 2

# #include <iostream>

## using namespace std;

void math(int num1, int num2, double num3);
int main()
{
//(ORDER STATUS)
int Order,
Stock;
double Special;
char question;

## cout <<"Middleton Wireless Company Ordering System\n"

<<"Place the amount for the number of spools ordered" << endl;
cin >> Order ;
if (Order < 1)
{
cout <<"Invalid Input! \n"
<<"Order must be larger than 0. \n"
<<"\n"
<<"Place the amount for the number of spools ordered" << en
dl;
cin >> Order ;
}
cout << "\n"
<<"How many spools are currently in stock?" << endl;
cin >> Stock;
if (Stock <= 0)
{
cout <<"Invalid Input! \n"
<<"There are more than 0 spools in stock. \n"
<<"Input the correct data.\n"
<< "\n"
<<"How many spools are currently in stock?" << endl;
cin >> Stock;
}
cout <<"\n"
<<"Any additonal shipping & handling charges? \n"
<<"If so enter (y/Y), If there are none enter (n/N)" << endl;
cin >> question;
if (question == 'n' || question == 'N')
{
Special = 0.00;
}
else if (question == 'y' || question == 'Y')
{
cout <<"Enter the amount for additional shipping and handling ch
arges \n"
<<"\$";
cin >> Special;
}
math(Order, Stock, Special);
system("pause");
return 0;
}
void math(int num1, int num2, double num3)
{
int spools = num1,
stock = num2;
double special = num3;
double shipping = 10.00,
backorder = spools - stock;
//IF ORDER WAS TOO LARGE FOR SPOOLS IN STOCK
if (backorder > 0)
{
price = 100 * stock,
cout <<"\n"
<<"The order was too large for the current number of sp
ools in stock, \n"
<<"There is a backorder of " << backorder <<" spools. \
n"
<<"The available number of spools ready to ship is " <<