Reply To: price and size Home › Forums › C Programming › price and size › Reply To: price and size February 12, 2008 at 3:56 pm #3323 HumayanParticipant You could do : enum size { XL , L } <br /> if ( tShirtWorth > 500 && size == XL )<br /> {<br /> discount = 100;<br /> }<br /> else if ( price > 400 && size == L )<br /> {<br /> discount = 50;<br /> } 123456789 enum size { XL , L } <br />if ( tShirtWorth > 500 && size == XL )<br />{<br /> discount = 100;<br />}<br />else if ( price > 400 && size == L )<br />{<br /> discount = 50;<br />} if you just needed the logic……