You are viewing a single comment's thread. Return to all comments →
void bonAppetit(vector<int> bill, int k, int b) { int s = 0; for(int i =0;i<bill.size();i++){ if(i == k){ continue; } else{ s+=bill[i]; } } if(b == (s/2)){ cout<<"Bon Appetit"; } else{ cout<<b-(s/2); } }
Seems like cookies are disabled on this browser, please enable them to open this website
Bill Division
You are viewing a single comment's thread. Return to all comments →
C++