Discounting and cost-cutting efforts have contributed to a flat second quarter profit at department store retailer JC Penney Company Inc.