Learn C With Me Beginners C Tutorial If Statement
//w.a.p to take quantity and price per item and if quantity is greater than 1000 then 10% discount will be gievn. #include #include void main() { int qnt,dis=10; float rate,total=0; printf(“Enter Quantity:”); scanf(“%d”,&qnt); printf(“Enter rate”); scanf(“%f”,&rate); if(qnt>1000) { printf(“Total Rate Is :%f”,total=((qnt*rate)-(qnt*rate*dis/100))); } else { printf(“Quantity is less than 1000″); } getch(); } /*w.a.p to [...]