Purchase_details: printf("Details of the purchase..."); if(qty1>0){ gotoxy(6,4); printf("%s",prdnme1); gotoxy(26,4); printf("%f",unit_price1); gotoxy(43,4); printf("%d",qty1); gotoxy(60,4); subtotal1=unit_price1*qty1; printf("%f",subtotal1); } if(qty2>0){ gotoxy(6,6); printf("%s",prdnme2); gotoxy(26,6); printf("%f",unit_price2); gotoxy(43,6); printf("%d",qty2); gotoxy(60,6); subtotal2=unit_price2*qty2; printf("%f",subtotal2); } if(qty3>0){ gotoxy(6,8); printf("%s",prdnme3); gotoxy(26,8); printf("%f",unit_price3); gotoxy(43,8); printf("%d",qty3); gotoxy(60,8); printf("%f",unit_price3*qty3); }