Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int findBayOfCar(int carNumber) {
- int count = 0;
- for (int i=0;i<cars.length;i++) {
- if (!isEmpty(i)) {
- ++count;
- if(count == carNumber) {
- return i;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement