You are viewing a single comment's thread. Return to all comments →
C++ CODE
void bonAppetit(vector<int> bill, int k, int b) { int sum = 0; for(int i =0;i<bill.size();i++){ if(i == k){ continue; } else{ sum+=bill[i]; } } if(b == (sum/2)){ cout<<"Bon Appetit"; } else{ cout<<b-(sum/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++ CODE