One way to find the city code for a particular city is to telnet to madlab.sprl.umich.edu port 3000, hit Enter, select option 1, then option 3.
Another way to figure out the city code is just to look through a list of city/city-code pairs yourself.
Some common city codes that people seem to be confused about: