This repository contains a simple Mart application written in C. The application allows users to select items from three categories: Clothes, Edibles, and Electronics, and calculates the total bill based on the selected items.
To use the application:
Clone the repository: git clone https://github.com/Jawad-Nasir/Mart-App.git
Compile the code: gcc martapp.c -o martpp
Run the executable: ./martapp
- Users can select items from three categories: Clothes, Edibles, and Electronics.
- Each category displays a list of items with their ID, name, price, quantity, and availability.
- Users can add items to their cart and view the total bill.
- The application ensures that users cannot select items that are out of stock or enter invalid input.
The code is structured into the following main components:
- 'main.c': Contains the main logic of the shopping cart application.
- 'display_items()': Function to display items in each category.
- 'clothing()', 'edibles()', 'electronics()': Functions to handle user selection for each category.
- struct shop: Defines the structure for each item in the shop, including ID, name, price, quantity, and availability.
Contributions to this project are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository
- Create a new branch (git checkout -b feature-name)
- Make your changes
- Commit your changes (git commit -am 'Add new feature')
- Push to the branch (git push origin feature-name)
- Create a new Pull Request