President Trump said the cease-fire between the countries was still in effect after exchanges of fire in the Persian Gulf.