All pastes #79906 Raw Edit

Untitled

public text v1 · immutable
·published 2006-07-05 21:24 UTC
rendered paste body
 while(1)
                {               
                cout << endl << name1 << " how many of the remaining " << chipCount << " chip(s) would you like (" << chipCount/2 << " max)?";
                cin >> inputNum;
                        
                        while(inputNum > chipCount/2)
                        {
                               
                                        cout<<"Error: Chips taken must be at most half of the chips. (" << chipCount/2 << "max) ";
                                        cin >> inputNum;
                                        
                                   
                        }
                if(inputNum <= chipCount/2)
                        {
                        chipCount=chipCount-inputNum;
                        }        
                }