Documente Academic
Documente Profesional
Documente Cultură
a=400.00*TV;
b=220.00*VCR;
c=35.00*RC;
d=300.00*CD;
e=150.00*TR;
subtotal=a+b+c+d+e;
tax=0.0825*subtotal;
total=tax+subtotal;
printf("QTY
DESCRIPTION
UNIT PRICE
TOTAL PRICE\n");
printf("-------------------------------------------------------------------------------\n");
printf("%2d
TV
RM400.00
RM%8.2f
\n",TV,a);
printf("%2d
VCR
RM220.00
RM%8.2f
\n",VCR,b);
printf("%2d
Remote control
printf("%2d
CD player
printf("%2d
tape recorder
RM35.00
RM300.00
RM150.00
RM%8.2f
RM%8.2f
RM%8.2f
\n",RC,c);
\n",CD,d);
\n",TR,e);
printf("\n");
printf("
------------------------------------------\n");
printf("
SUBTOTAL
printf("
TAX
printf("
TOTAL
printf("
return 0;
}
** RM%8.2f **
** RM%8.2f **
** RM%8.2f **
\n",subtotal);
\n",tax);
\n",total);
-----------------------------------------\n");