#Include #Include Using Namespace Char Char Char Char Char Char Int Float Float Int
#Include #Include Using Namespace Char Char Char Char Char Char Int Float Float Int
#include <conio.h>
using namespace std;
char Fname[100]={};
char Lname [100]={};
char mobile [100]={};
char state[100]={};
char town[100]={};
char brgy [100]={};
int pc, n, pr;
float a=0,b=0,c=0,d=0;
float pra, prb, prc, prd;
int main ()
{
//LALAGYAN NG MATINONG FRONT PAGE!!!
//Costumer Details
system ("cls");
cout<<"\n-------------------------------------------------------------
";
cout<<"\n\t\t\tBILLING ADRESS: ";
cout<<"\n-------------------------------------------------------------
";
cout<<"\n\n"<<Lname<<", "<<Fname;
cout<<"\n"<<brgy<<", "<<town<<", "<<state;
cout<<"\n"<<mobile;
cout<<"\n\n\nEdit?";
cout<<"\n [1] YES";
cout<<"\n [2] NO.Proceed to catalog";
cout<<"\n [3] EXIT";
int x;
cout<<endl;
cin>>x;
if (x==1)
{
system ("cls");
goto A;
}
else if (x==2)//catalog
{
B:
system ("cls");
cout<<"----------------------------------------------------------
-----------"<<endl;
cout<<" CATALOG
"<<endl<<endl;
cout<<"----------------------------------------------------------
-----------"<<endl;
cout<<"\tPRODUCT CODE: PRODUCT PRICE"<<endl;
cout<<"\t0 yyy Php 19.00"<<endl;
cout<<"\t1 www Php 10.00"<<endl;
cout<<"\t2 yyy Php 15.00"<<endl;
cout<<"\t3 zzz Php 20.00"<<endl;
cout<<"----------------------------------------------------------
-----------"<<endl;
if (pc == 0 || pc == 1 || pc ==2 || pc == 3)
{
cout<<"\tQuantity: ";
cin>>n;
C:
switch (pc)
{
case 0:
a = (a+1)*n;
pra = a*19;
break;
case 1:
b = (b+1)*n;
prb = b*20;
break;
case 2:
c = (c+1) *n;
prc = c*15;
break;
case 3:
d = (d+1) *n;
prd = d *10;
break;
default:
cout<<"You have entered an invalid code.\n";
cout<<"Try again?";
cout<<"\n[1] YES";
cout<<"\n[2] TERMINATE TRANSACTION.\n";
int q;
cin>>q;
if (q==1)
{
system ("cls");
goto B;
}
else
{
system ("cls");
cout<<"Thank you for visiting our shop!";
getch ();
return 0;
}
}
}
}
D:
cout<<"\n\n\t*****Item succesfully added to you
bag!******";
cout<<"\n\nContinue shopping?";
cout<<"\n\n[1] YES";
cout<<"\n[2] TERMINATE TRANSACTION.";
cout<<"\n[3] CHECKOUT\n";
int w;
cin>>w;
if (w==1)
{
system ("cls");
goto B;
}
else if (w==2)
{
system ("cls");
cout<<"Thank you for visiting our shop!";
getch ();
return 0;
}
else
{
goto CHECKOUT;
}
CHECKOUT:
system ("cls");
cout<<"----------------------------------------------
---------------";
cout<<"\t\t\t\t\nPURCHASED ITEMS: ";
cout<<"\n--------------------------------------------
-----------------";
cout<<"\n\nItem:\t\t\t Quantity:\t\t\t Price:";
if (a!=0)
{
cout<<"\nyyy\t\t\t"<<a<<"\t\t\t\t\t"<<pra;
}
if (b!=0)
{
cout<<"\nwww\t\t\t"<<b<<"\t\t\t\t\t"<<prb;
}
if (c!=0)
{
cout<<"\nyyy\t\t\t"<<c<<"\t\t\t\t\t"<<prc;
}
if (d!=0)
{
cout<<"\nzzz\t\t\t"<<d<<"\t\t\t\t\t"<<prd;
}
float sub=pra+prb+prc+prd;
cout<<"\n\n\tSUBTOTAL: \t"<<sub;
cout<<"\tShipping cost: \t Php 50.00";
cout<<"\n--------------------------------------------
-----------------";
cout<<"\n\t\t\t\nTOTAL AMOUNT: \t"<<"Php "<<sub+50;
cout<<"\n--------------------------------------------
-----------------";
int e;
cin>>e;
if (e==1)
{
goto E;
}
else
{
system ("cls");
cout<<"Thank you for visiting our shop!";
getch ();
return 0;
}
E:
system ("cls");
cout<<"----------------------------------------------
---------------";
cout<<"\n\t\t\tUSER'S SHIPPING ADDRESS: ";
cout<<"\n--------------------------------------------
-----------------";
cout<<"\n\n"<<Lname<<", "<<Fname;
cout<<"\n"<<brgy<<", "<<town<<", "<<state;
cout<<"\n"<<mobile;
int r;
cin>>r;
if (r==1)
{
system ("cls");
cout<<"\n--------------------------------------
-----------------------";
cout<<"\n\t\tYour order will be delivered
within 3-5 working days.";
cout<<"\t\t\nThank you for shopping!";
cout<<"\n--------------------------------------
-----------------------";
getch ();
return 0;
}
else
{
system ("cls");
cout<<"\n--------------------------------------
-----------------------";
cout<<"\t\t\t\t\n\nThank you for visiting our
shop!";
cout<<"\n--------------------------------------
-----------------------";
getch ();
}
getch ();
return 0;
}