Danish energy firm posts profits as electricity and gas prices rocket