President Trump has given an ultimatum to President Vladimir V. Putin of Russia to end the war in Ukraine or face U.S. sanctions.