This repository contains a Voting Machine project implemented in C, showcasing two different approaches to conducting an electronic voting system. It also includes a project report detailing the implementation.
- Two different approaches to a voting system
- Secure voting mechanism
- Vote counting and result display
- Detection of invalid votes
1️⃣ Basic Approach
- Uses a simple structure with
if-else
conditions to count votes - Allows users to cast votes and view results
- Handles invalid votes
2️⃣ Modular Approach (Functions & Macros)
- Uses functions for better code organization
- Defines candidates using macros
- Includes a feature to display the leading candidate
- Clone the repository:
git clone https://github.com/maruf346/voting-machine.git
- Navigate to the project directory.
- Compile and run the C program:
gcc voting_machine.c -o voting_machine ./voting_machine
- Follow the on-screen instructions to cast votes and view results.
- GCC Compiler (or any C compiler)
- Basic knowledge of C programming
The repository also contains a project report explaining the implementation, features, and improvements.
Author: Maruf Hossain.
Dept. of CSE.
Green University of Bangladesh.
mail: maruf.bshs@gmail.com
Feel free to explore, use, and improve the project! 🚀😊