After a terrorist attack in Kashmir, India and Pakistan traded volleys of attacks. The two sides said they had agreed to a cease-fire on Saturday.