You are on page 1of 5

#include<stdio.

h>
#include<conio.h>
main()
{
textbackground(WHITE);
clrscr();
int dep;
int quant;
int quan;
float a,b,c,d,e;
float t1,t2,iva,desc,to_pay;
iva=0.11;
/*PLANTILLA*/
textcolor(BLACK);
gotoxy(2,1);
cprintf("***********************************************************************
*******");
gotoxy(2,2);
cprintf("*
*");
gotoxy(2,25);
cprintf("***********************************************************************
*******");
gotoxy(2,3);
cprintf("***********************************************************************
*******");
gotoxy(34,2);
cprintf("ABDUL'S STORES");
gotoxy(2,4);
cprintf("*
*");
gotoxy(2,4);
cprintf("** ****** AREA ****** | ****** PRODUCTO: ****** | * CANT * | *
PROM **");
gotoxy(2,5);
cprintf("*
*");
gotoxy(2,6);
cprintf("*
*");
gotoxy(2,7);
cprintf("*
*");
gotoxy(2,8);
cprintf("*
*");
gotoxy(2,9);
cprintf("*
*");
gotoxy(2,10);
cprintf("*
*");
gotoxy(2,11);
cprintf("*
*");
gotoxy(2,12);
cprintf("*
*");
gotoxy(2,13);
cprintf("*

*");
gotoxy(2,14);
cprintf("*
*");
gotoxy(2,15);
cprintf("*
*");
gotoxy(2,16);
cprintf("*
*");
gotoxy(2,17);
cprintf("*
TOTAL:
*");
gotoxy(2,18);
cprintf("*
IVA:
*");
gotoxy(2,19);
cprintf("*
DESCUENTO:
*");
gotoxy(2,20);
cprintf("*
TOTAL A PAGAR:
*");
gotoxy(2,21);
cprintf("*
*");
gotoxy(2,22);
cprintf("*
*");
gotoxy(2,23);
cprintf("*
*");
gotoxy(2,24);
cprintf("*
*");
/*AREAS*/
textcolor(RED);
gotoxy(4,6);
cprintf("1) ABARROTES");
gotoxy(4,7);
cprintf("2) CARNES FRIAS");
gotoxy(4,8);
cprintf("3) FRUTAS Y VERDURAS");
textcolor(LIGHTBLUE);
gotoxy(30,6);
cscanf("%d",&dep);
/*PRODUCTOS*/
switch(dep)
{
case 1:a=18.50;b=12.50;c=13.50;d=25.00;e=15.00;gotoxy(30,6);cprintf("1) ACEITE..
..........$%0.2f",a);gotoxy(30,7);cprintf("2) FRIJOL............$%0.2f",b);gotox
y(30,8);cprintf("3) ARROZ.............$%0.2f",c);gotoxy(30,9);cprintf("4) MAYONE
SA..........$%0.2f",d);gotoxy(30,10);cprintf("5) AZUCAR............$%0.2f",e);br
eak;
case 2:a=65.50;b=69.50;c=22.50;d=32.50;e=69.00;gotoxy(30,6);cprintf("1) CARNE MO
LIDA......$%0.2f",a);gotoxy(30,7);cprintf("2) BISTEK............$%0.2f",b);gotox
y(30,8);cprintf("3) PIERNA Y MUSLO....$%0.2f",c);gotoxy(30,9);cprintf("4) ALITAS
DE POLLO...$%0.2f",d);gotoxy(30,10);cprintf("5) COSTILLA P/ ASAR..$%0.2f",e);br
eak;
case 3:a=19.50;b=12.00;c=18.50;d=18.00;e=32.00;gotoxy(30,6);cprintf("1) PAPA (kg
).........$%0.2f",a);gotoxy(30,7);cprintf("2) LECHUGA(pz).......$%0.2f",b);gotox

y(30,8);cprintf("3) TOMATE (kg).......$%0.2f",c);gotoxy(30,9);cprintf("4) CHILE


(kg)........$%0.2f",d);gotoxy(30,10);cprintf("5) CEBOLLA (kg)......$%0.2f",e);br
eak;
default:gotoxy(30,6);cprintf("EL AREA NO EXISTE");break;
}
textcolor(GREEN);
if(dep==1)
{
gotoxy(49,4);
cscanf("%d",&quant);
switch(quant)
{
case 1:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("1) ACEITE............$%0.2f",a
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(73,6);cprintf("2 x 1");gotoxy(63,6);cscanf("%d",&quan);t1=quan*a;gotoxy(30,17);
cprintf("$%0.2f",t1);t2=(quan*a)/2;gotoxy(30,19);cprintf("$%0.2f",t2);desc=t1-t2
;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 2:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("2) FRIJOL............$%0.2f",b);gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(70,6);cprintf("%50 desc");gotoxy(63,6);cscanf("%d",&quan);t1=quan*b;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*b)/2;gotoxy(30,19);cprintf("$%0.2f",t2);desc=t1
-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 3:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("3)
ARROZ.............$%0.2f",c);gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(72,6);cprintf("3 x 2");gotoxy(63,6);cscanf("%d",&quan);t1=quan*c;gotoxy(30,17);
cprintf("$%0.2f",t1);t2=(quan*c)*0.3333;gotoxy(30,19);cprintf("$%0.2f",t2);desc=
t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 4:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("4) MAYONESA...........%0.2f"
,d);gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(70,6);cprintf("%75 desc");gotoxy(63,6);cscanf("%d",&quan);t1=quan*d;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*d)*0.75;gotoxy(30,19);cprintf("$%0.2f",t2);desc
=t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 5:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("5) AZUCAR............$%0.2f",e);textcolor(RED);gotoxy
(70,6);cprintf("Rema %80");gotoxy(63,6);cscanf("%d",&quan);t1=quan*e;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*e)*0.8;gotoxy(30,19);cprintf("$%0.2f",t2);desc=
t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
}
}
if(dep==2)
{
gotoxy(49,4);
cscanf("%d",&quant);
switch(quant)
{
case 1:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("1) CARNE MOLIDA......$%0.2f",a
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(73,6);cprintf("2 x 1");gotoxy(63,6);cscanf("%d",&quan);t1=quan*a;gotoxy(30,17);

cprintf("$%0.2f",t1);t2=(quan*a)/2;gotoxy(30,19);cprintf("$%0.2f",t2);desc=t1-t2
;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 2:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("2) BISTEK............$%0.2f",b);gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(70,6);cprintf("%50 desc");gotoxy(63,6);cscanf("%d",&quan);t1=quan*b;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*b)/2;gotoxy(30,19);cprintf("$%0.2f",t2);desc=t1
-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 3:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("3)
PIERNA Y MUSLO....$%0.2f",c);gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(72,6);cprintf("3 x 2");gotoxy(63,6);cscanf("%d",&quan);t1=quan*c;gotoxy(30,17);
cprintf("$%0.2f",t1);t2=(quan*c)*0.3333;gotoxy(30,19);cprintf("$%0.2f",t2);desc=
t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 4:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("4) ALITAS DE POLLO...$%0.2f"
,d);gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(70,6);cprintf("%75 desc");gotoxy(63,6);cscanf("%d",&quan);t1=quan*d;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*d)*0.75;gotoxy(30,19);cprintf("$%0.2f",t2);desc
=t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 5:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("5) COSTILLA P/ ASAR..$%0.2f",e);textcolor(RED);gotoxy
(70,6);cprintf("Rema %80");gotoxy(63,6);cscanf("%d",&quan);t1=quan*e;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*e)*0.8;gotoxy(30,19);cprintf("$%0.2f",t2);desc=
t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
}
}
if(dep==3)
{
gotoxy(49,4);
cscanf("%d",&quant);
switch(quant)
{
case 1:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("1) PAPA (kg).........$%0.2f",a
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(73,6);cprintf("2 x 1");gotoxy(63,6);cscanf("%d",&quan);t1=quan*a;gotoxy(30,17);
cprintf("$%0.2f",t1);t2=(quan*a)/2;gotoxy(30,19);cprintf("$%0.2f",t2);desc=t1-t2
;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 2:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("2) LECHUGA(pz).......$%0.2f",b);gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(70,6);cprintf("%50 desc");gotoxy(63,6);cscanf("%d",&quan);t1=quan*b;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*b)/2;gotoxy(30,19);cprintf("$%0.2f",t2);desc=t1
-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 3:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("3)
TOMATE (kg).......$%0.2f",c);gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(72,6);cprintf("3 x 2");gotoxy(63,6);cscanf("%d",&quan);t1=quan*c;gotoxy(30,17);
cprintf("$%0.2f",t1);t2=(quan*c)*0.3333;gotoxy(30,19);cprintf("$%0.2f",t2);desc=
t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 4:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"

);gotoxy(30,7);cprintf("

");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("4) CHILE (kg)........$%0.2f"
,d);gotoxy(30,10);cprintf("
");textcolor(RED);gotoxy
(70,6);cprintf("%75 desc");gotoxy(63,6);cscanf("%d",&quan);t1=quan*d;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*d)*0.75;gotoxy(30,19);cprintf("$%0.2f",t2);desc
=t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
case 5:gotoxy(30,6);textcolor(LIGHTBLUE);cprintf("
"
);gotoxy(30,7);cprintf("
");gotoxy(30,8);cprintf("
");gotoxy(30,9);cprintf("
");gotoxy(30,10);cprintf("5) CEBOLLA (kg)......$%0.2f",e);textcolor(RED);gotoxy
(70,6);cprintf("Rema %80");gotoxy(63,6);cscanf("%d",&quan);t1=quan*e;gotoxy(30,1
7);cprintf("$%0.2f",t1);t2=(quan*e)*0.8;gotoxy(30,19);cprintf("$%0.2f",t2);desc=
t1-t2;to_pay=desc-(0.11*t2);gotoxy(30,20);cprintf("$%0.2f",to_pay);break;
}
}
gotoxy(30,18);
cprintf("11%");
getchar();
return 0;
}

You might also like