Which of these sentences is punctuated correctly?

(1 point)
Responses

John Quincy Adams (1767–1848) was the sixth president of the United States.
John Quincy Adams (1767–1848) was the sixth president of the United States.

John Quincy Adams [1767–1848] was the sixth president of the United States.
John Quincy Adams [1767–1848] was the sixth president of the United States.

John Quincy Adams, 1767–1848, was the sixth president of the United States.
John Quincy Adams, 1767–1848, was the sixth president of the United States.

John Quincy Adams—1767–1848—was the sixth president of the United States.

The first sentence is punctuated correctly:

John Quincy Adams (1767–1848) was the sixth president of the United States.