Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. public int findBayOfCar(int carNumber) {
  2. int count = 0;
  3. for (int i=0;i<cars.length;i++) {
  4. if (!isEmpty(i)) {
  5. ++count;
  6. if(count == carNumber) {
  7. return i;
  8. }
  9. }
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement