//Kyu Bae //Program 9B //3-12-00 //Purpose: //This program provides the opportunity to : //1) Process 2 pallel arrays. //2) Reinforce objectives of previous lab projects. #include #include void CheckNum(int iProductIdArr[], int iQuantityArr[]); void PrintInvoice(int iProductIdArr[], int iQuantityArr[]); //input: none //call check function and print function //output : return o int main (void) { char cAnswer; int iProductIdArr[8]={101,102,103,104,105,106,107,108}; int iQuantityArr[8]={0,0,0,0,0,0,0,0}; do { cout<<"Do you have a order to place? "<>cAnswer; if(cAnswer=='n' || cAnswer=='N') break; else CheckNum( iProductIdArr, iQuantityArr); } while (cAnswer=='Y'|| cAnswer=='y'); PrintInvoice( iProductIdArr, iQuantityArr); return 0; } //input: iProductIdArr //enter product number and number of order they place //output: none void CheckNum (int iProductIdArr[],int iQuantityArr[]) { int iItemNum; int iHowMany; int i; cout<<"Enter the product Number: "<>iItemNum; for (i=0; i<8 && iItemNum != iProductIdArr[i]; i++) ; //null loop if (i<8) { cout<<"How many do you want to order? "<>iHowMany; iQuantityArr[i]=iQuantityArr[i]+ iHowMany; } else cout<<"You entered invalid product number!!!"<