Hundreds of demonstrators gathered in cities across the country to protest President Trump’s ban on transgender service members in the military, which he announced on Twitter.