since no one stepped up to do my research, i'll do it myself. just a sec.
ok, i'm back. so in modern/post-modern days there has been one president elected directly out of a position in the federal legislature: ex Senator John F. Kennedy. before that you've got to go back to Warren Harding, who was also a senator. other than that there have been a grip of governors, a war hero, and a few veeps.