<u>Answer:</u> The elements present are potassium, nitrogen and oxygen.
<u>Explanation:</u>
Elements are defined as the substances in which same type of atoms are present. <u>For Example:</u> Sodium, Chlorine etc.
The chemical formula of the compound used in fireworks is 
The chemical name for the compound is potassium nitrate.
This compound is formed by the combination of three elements. In 1 mole of potassium nitrate, 1 mole of potassium atom, 1 mole of nitrogen atom and 3 moles of oxygen atoms are present.
Hence, the elements present are potassium, nitrogen and oxygen.