The Democratic People’s Republic of Korea has test-fired sea-to-surface cruise missiles as the US president visits South Korea.