You are viewing a single comment's thread. Return to all comments →
int maxPrice = -1; for(int i=keyboards.length-1; i>=0; i--) { int keyboardprice = keyboards[i]; for(int j=drives.length-1; j>=0; j--) { int driveprice = drives[j]; if(keyboardprice + driveprice <= b) { if(keyboardprice + driveprice > maxPrice) { maxPrice = keyboardprice + driveprice; } } } } return maxPrice;
Seems like cookies are disabled on this browser, please enable them to open this website
Electronics Shop
You are viewing a single comment's thread. Return to all comments →