Code:
...
printf("\n\n\tA\tSmarties\t%3.2f\t%8.2f\t$%8.2f",A_P,a,sub1=a*A_P);
...
printf("\n\n\n\ttotal pounds =\t%8.2f\tSUBTOTAL\t$%8.2f",
i=a+b+c+d+e+f+g+h,run=sub1+sub2+sub3+sub4+sub5+sub6+sub7+sub8);
Excuse me while I go away and puke.
This printf is unreadable enough without the assignment inside it. Do at least this:
Code:
...
sub1=a*A_P;
printf("\n\n\tA\tSmarties\t%3.2f\t%8.2f\t$%8.2f",A_P,a,sub1);
...
run=sub1+sub2+sub3+sub4+sub5+sub6+sub7+sub8;
i=a+b+c+d+e+f+g+h;
printf("\n\n\n\ttotal pounds =\t%8.2f\tSUBTOTAL\t$%8.2f", i, run);
Using single letter variable names is probably not the greatest idea.
--
Mats