The 12th Amendment to the Constitution of the United States
provides for the election of the president and vice president by
the electoral college, and if no candidate obtains a majority, the
House of Representatives chooses the President.
The only president of the United States to be elected by the
House of Representatives under the 12th Amendment is John Quincy
Adams.

In 1824, four major candidates vied for the presidency: Andrew
Jackson, John Quincy Adams, William H. Crawford and Henry Clay. In
the election, John Quincy Adams received 40,000 fewer votes than
Andrew Jackson – Jackson received 153,544 votes out of a
total of 356,038 cast in that election. Adams also garnered fewer
electoral college votes than Jackson (Jackson had 99, Adams 84 and
the other 78 votes going to other candidates). Since no candidate
had a majority of electoral college votes, the presidential
election went to the House of Representatives to select the
president from the top three