US President Donald Trump expressed his discontent with Iran, adding that "sometimes you have to" use military force.