Ah, the glory/shame of scanf() comes to light!
In many ways, scanf() is a very poor function to use because of it's ease of destruction (just as you've pointed out), it's lack of error reporting, and general lack of robustness.
It's generally advised to use gets() to get the input string and then parse it yourself, with a combination of conversion functions, like atoi() and atof()...
Anyway, your problem, specifically, is that you're not supplying a variable assignment. You're just supplying a format string and that's bad!
Code:
scanf("%d, &nRoomLength"); // this is what you are doing
scanf( "%d", &nRoomLength); // this is what you should be doing...
The reason why the compiler can't give you an error, or even a warning, is because of the
variable arguments mechanism used by scanf() and printf(). It would take me a while to explain exactly why the compiler can't just "know" how to interpret the variable parameters (in both number and type!) but if you're interested, I'll be back to tell you an interesting story. Rest assured, this is no simple typo error. This is a seriously
twisted "feature" of C and should always be looked upon with dear caution...
Learn your lesson, now!