You've got a good beginning program here. I congratulate you on getting this far.

What you want is the same question asked over and over again until you open the door. You need a loop, which is the point of variables; making loops act differently different times through.

Lemme psuedocode something for you:
Code:
do 
{
  show description.
  if (the key is not picked up) describe key in room.
  show choices "a) get key, b) open door"
  get input.
  if (input == 'a') 
  {
    pick up key (set key = 1)
    show pickup key message "It's a nice enough key, shiny and gold."
  }
  else if (input == 'b') 
  {
    if (key is not picked up) 
    {
      show key not picked up message
    }
    else
    {
      open door (you'll need a door variable, I'm thinking)
      show door open message
    }
  }
  else
  {
    show "press 'a' or 'b'" message
  }
} while (the door is not open)
show exit message.
It's not as major a rewrite as it seems, but it is a major rethink. This way when you get out of the room you're out of the loop and you can move on with the next step without nesting the next step inside the previous.

Here's a Cymon's Games example: http://cymonsgames.retroremakes.com/letterguess/