US President Donald Trump hinted at repeating military action against Iran to prevent it from acquiring nuclear weapons.