Of the individuals elected as president, four died in office of natural causes ( William Henry Harrison , Zachary Taylor , Warren G. Harding , and Franklin D. Roosevelt ), four were assassinated ( Abraham Lincoln , James A. Garfield , William McKinley , and John F. Kennedy ) and one resigned ( Richard Nixon ).