A little clarity is required here. If speaking to someone, after completing the exam, then the tense of the sentence is in the past (preterit).
So it would be "what a nice exam it was."
But if speaking to yourself, after looking over the questions and seeing how easy the exam is, the answer would be: "What a nice exam it is."
Hope that helps.