Skip to content

codexbutcher/Simple-Banking-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Banking System (C)

A modular ATM-based banking system implemented in C using multiple source files and a header file.
This project demonstrates structured programming, function modularization, pointer usage, and separate compilation in C.


📌 Project Description

This project simulates a basic ATM system with PIN authentication and core banking operations.
The application is divided into multiple source files to maintain modular design and clean code structure.

The system requires a valid PIN to access banking operations and allows the user to perform basic account transactions through a console interface.


🚀 Features

🔐 PIN-Based Login

  • User must enter a PIN to access the ATM.
  • Maximum of 3 attempts allowed.
  • If incorrect PIN is entered 3 times, the program exits.

💰 Deposit

  • Allows the user to deposit money.
  • Only positive amounts are accepted.
  • Invalid deposits are rejected.

💵 Withdraw

  • Allows the user to withdraw money.
  • Withdrawal amount must:
    • Be greater than 0
    • Not exceed current balance.
  • Prevents overdrawing the account.

📊 Check Balance

  • Displays the current account balance.

❌ Exit

  • Allows the user to exit the ATM system safely.

🧩 Modular Structure

  • ATM.c → Handles login system and main ATM menu.
  • Account.c → Handles deposit, withdrawal, and balance operations.
  • Account.h → Contains function declarations.
  • Demonstrates header file usage and separate compilation.

🗂 Project Structure

Simple-Banking-System/
│
├── ATM.c
├── Account.c
├── Account.h
└── README.md

📥 Installation

Clone this repository:

git clone https://github.com/codexbutcher/Simple-Banking-System.git

Navigate into the project directory:

cd Simple-Banking-System

🛠 How to Compile

Using GCC:

gcc ATM.c Account.c -o atm

▶ How to Run

On Windows:

atm.exe

On Linux / Mac:

./atm

🧑‍💻 How to Use the Program

  1. Run the program.
  2. Enter the PIN: 1234
  3. After successful login, choose from the menu:
    • 1 → Deposit
    • 2 → Withdraw
    • 3 → Check Balance
    • 4 → Exit
  4. Follow the on-screen instructions.
  5. If the wrong PIN is entered 3 times, the program terminates.

🧠 Concepts Used

  • Functions
  • Pointers (pass by reference)
  • Header files
  • Separate compilation
  • Switch-case statements
  • Loops (do-while, while)
  • Conditional logic

🎯 Purpose of This Project

This project was built to strengthen understanding of:

  • Modular programming in C
  • Code organization across multiple files
  • Function declarations and definitions
  • Basic ATM system logic implementation

About

Modular ATM system implemented in C using header files and separate compilation.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages