Why did Richard Nixon resingn as president?

The House of Representatives was gathering the information on which they could base their impeachment of Pres. Nixon for his alleged role in the June 17, 1972 break-in and burglary of the Democratic National Committee headquarters in the Watergate Complex in Washington, DC. In light of the growing pile of evidence against his office, and after being made aware that presidential priveledge did not extend as far as he had thought, he must have started to realize that he would probably not fare well in an impeachment trial.