First, be attentive. The question is about an ELECTED president, not just the youngest one. Actually, Theodore Roosevelt aged 42 was the youngest U.S. President to take office. But he was sworn in after the assassination of President William McKinley and wasn't elected.

That makes John Fitzgerald "Jack" Kennedy the youngest president ever voted to the office: he was 43, when his presidency began. He served as the U.S. President from the 20th of January, 1961 till the assassination on the 22nd of November, 1963. His term lasted only for 2 years and 41 weeks. Kennedy made a large contribution to the development of the US foreign policy - he negotiated the Nuclear Test-Ban Treaty and initiated the Alliance for Progress.