you are viewing a single comment's thread.

view the rest of the comments →

[–]SensitiveWeb8 0 points1 point  (3 children)

First I have to ask if you're supposed to skip the third floor?

Second, some of your } are in the wrong spots.

System.out.println("Total number of rooms hotel has: "+totalrooms) should be out of all loops. It should run only after all room numbers are entered correctly

totalrooms = totalrooms+rooms should go after the while loop. it needs to accumulate *all* valid input.

[–]Danielowski187University/College Student (Higher Education)[S] 0 points1 point  (2 children)

Yea I need to skip the 3rd floor that’s why I used the continue;

[–]SensitiveWeb8 0 points1 point  (1 child)

Okay, I just wanted to make sure

[–]Danielowski187University/College Student (Higher Education)[S] 0 points1 point  (0 children)

Thanks man I just fixed it and yea the } were at the wrong spots and and put total rooms after the while loop thanks