Iran's president said the U.S. had failed to undermine a nuclear deal between Tehran and major powers, state TV said.