/*Precio:
Descuento: %
Descuento en $
Precio Final: */
#include<stdio.h>
main
()
{
float
P,C,CD,PD,D,PT,T;
char
d; d='s';
while(d=='s')
{
printf("Precio del producto:");
scanf("%f",&P);
printf("Porciento de descuento:");
scanf("%f",&PD);
CD=P*D;
PT=P-CD;
T=T+PT;
printf("Desea agregar otro producto s o n:");
d=
getchar();
scanf("%c",&d);}
printf("El total es %f",T);
return
0;
}
No hay comentarios.:
Publicar un comentario