my program records the number of bottles four rooms has collected in a bottle drive. When the user types in quit, the number of bottle each room has collected is shown as well a
I think your logic is sound (ie using a variable for the max value and max room and comparing each time). Were there any restriction as to not using arrays? It would seem that using 4 variables would require more lines of code.
I like the answer using a class. But you could very well do this with standard c with an array.
What is the requirement? encapsulation? robustness?