Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool addUp(vector<int> array, int k)
- {
- for(int i = 0; i < array.size(); i++)
- {
- for(int j = i+1; j < array.size(); j++)
- {
- if(array[i] + array[j] == k) return true;
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement