This menu driven program written in C simulates Prime Shopping Point, which sells laptops, mobiles, headphones and accesories for mobile and computer. Data of products is stored in arrays with distinct id for each product.
On executing the program, User will be asked to enter his/her name and this name will be displayed with welcome message.
This program also provides cart facility. User can view, edit and update cart using functions accordingly. For cart manipulation, c structure is used to initiate a cart with productids, price, name and totalcost.
struct cartcalc
{
int totalCost;
int incartid[50];
int incartprice[50];
char incartname[50][30];
} cart0;
Now, User adds Sony MDR-7506 headphones to the cart.
On selecting checkout and exit, the cart will be printed along with bill.
On selecting checkout option, bill is generated along with items printed on screen. We can repeat the same process for different user and every time bill will be generated accordingly!
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.