/in/foo.cc: In function 'int main()':
/in/foo.cc:103:28: warning: comparison of constant '3099' with boolean expression is always true [-Wbool-compare]
if (100 <= roomNum <= 3099 && nights > 0){
~~~~~~~~~~~~~~~^~~~~~~
/in/foo.cc:103:17: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
if (100 <= roomNum <= 3099 && nights > 0){
~~~~^~~~~~~~~~
/in/foo.cc:114:21: warning: iteration 29 invokes undefined behavior [-Waggressive-loop-optimizations]
if (floorCnt[i] >= max){
~~~~~~~~~~^
/in/foo.cc:113:23: note: within this loop
for (int i = 1; i <= 30; i++){
~~^~~~~
/in/foo.cc:120:31: warning: 'validNum' may be used uninitialized in this function [-Wmaybe-uninitialized]
avgNights = totalNights / double(validNum);
^~~~~~~~~~~~~~~~
/in/foo.cc:120:15: warning: 'totalNights' may be used uninitialized in this function [-Wmaybe-uninitialized]
avgNights = totalNights / double(validNum);
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~