WASHINGTON — President Obama said Tuesday that Donald J. Trump should “stop whining and go try to make his case to get votes.”