You are on page 1of 14

C Program for ATM Machine With Source Code

October 8, 2022 by angel jude suarez

The c programming ATM machine project is develop in C programming language, This Project With Source Code
is easy to used and understand the instructions.

A ATM In C is based on a concept of managing an account personally. From this ATM System C Mini Project,
the user can check total balance, Deposit Amount and Withdraw Amounts easily as it is not time-consuming.

This ATM System Project In C Language also includes a downloadable ATM Code In C for free, just find the
downloadable source code below and click to start downloading.
ATM Machine C Program With Source Code Free Download 2020 | C projects with S…
To start creating a ATM Banking System Project In C, make sure that you have code blocks or any platform
of C/C++ language installed in your computer.

ABOUT PROJECT PROJECT DETAILS

Project Name : ATM Machine

Project Platform : C/C++

Programming Language Used: C Programming Language

Developer Name : itsourcecode.com

IDE Tool (Recommended): Dev-C++/Codeblocks

Project Type : Desktop Application

Database: Stores data in .DAT file

ATM Machine C Program With Source Code Information

Steps on how to create a ATM Machine C Program


Time needed: 5 minutes.

ATM Machine C Program With Source Code


Step 1: Create a new project.
First open the code blocks IDE and click “create a new project“.

Step 2: Choose console application.


Second click the “console application” and after that click “next“.

Step 3: Choose C language.


Third choose “C language” and click “next“.

Step 4: Name Your Project.


Fourth name the project you’ve created and click “next” after that click “finish“.

Step 5: The actual code.


You are free to copy the given source code below or download the downloadable source code given.
The Code Given Below Is For The Main Menu Module

void mainMenu() {

printf("******************Hello!*******************\n");

printf("**********Welcome to ATM Banking***********\n\n");

printf("****Please choose one of the options below****\n\n");

printf("< 1 > Check Balance\n");

printf("< 2 > Deposit\n");

printf("< 3 > Withdraw\n");

printf("< 4 > Exit\n\n");

In this module which is the main menu of the system.

The Code Given Below Is For The Check Balance Module

void checkBalance(float balance) {

printf("You Choose to See your Balance\n");

printf("\n\n****Your Available Balance is: $%.2f\n\n", balance);

In this module which is the check balance module of the system.

The Code Given Below Is For The Deposit Module

float moneyDeposit(float balance) {

float deposit;

printf("You choose to Deposit a money\n");

printf("$$$$Your Balance is: $%.2f\n\n", balance);

printf("****Enter your amount to Deposit\n");

scanf("%f", &deposit);

balance += deposit;

printf("\n****Your New Balance is: $%.2f\n\n", balance);

return balance;

In this module which is the module for deposit a money.


Complete Source Code

#include <stdio.h>

#include <stdlib.h>

#include <stdbool.h>

#include <math.h>

//Functions

void login();

void mainMenu();

void checkBalance(float balance);

float moneyDeposit(float balance);

float moneyWithdraw(float balance);

void menuExit();

void errorMessage();

//Main Code

int main() {

//Local Declarations

int option;

float balance = 15000.00;

int choose;

bool again = true;

// insert code here...

while (again) {

mainMenu();

printf("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n");

printf("Your Selection:\t");

scanf("%d", &option);

switch (option) {

case 1:

system("CLS");

checkBalance(balance);

break;

case 2:

system("CLS");

balance = moneyDeposit(balance);

break;

case 3:

system("CLS");

balance = moneyWithdraw(balance);

break;

case 4:

system("CLS");

menuExit();

return 0;

default:

errorMessage();

break;

printf("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n");

printf("Would you like to do another transaction:\n");

printf("< 1 > Yes\n");

printf("< 2 > No\n");

scanf("%d", &choose);

system("CLS");

if (choose == 2) {

again = false;

menuExit();

return 0;

}//main code

//Functions

void mainMenu() {

printf("******************Hello!*******************\n");

printf("**********Welcome to ATM Banking***********\n\n");

printf("****Please choose one of the options below****\n\n");

printf("< 1 > Check Balance\n");

printf("< 2 > Deposit\n");

printf("< 3 > Withdraw\n");

printf("< 4 > Exit\n\n");

}//Main Menu

void checkBalance(float balance) {

printf("You Choose to See your Balance\n");

printf("\n\n****Your Available Balance is: $%.2f\n\n", balance);

}//Check Balance

float moneyDeposit(float balance) {

float deposit;

printf("You choose to Deposit a money\n");

printf("$$$$Your Balance is: $%.2f\n\n", balance);

printf("****Enter your amount to Deposit\n");

scanf("%f", &deposit);

balance += deposit;

printf("\n****Your New Balance is: $%.2f\n\n", balance);

return balance;

}//money deposit

float moneyWithdraw(float balance) {

float withdraw;

bool back = true;

printf("You choose to Withdraw a money\n");


printf("$$$$Your Balance is: $%.2f\n\n", balance);

while (back) {

printf("Enter your amount to withdraw:\n");

scanf("%f", &withdraw);

if (withdraw < balance) {

back = false;

balance -= withdraw;

printf("\n$$$$Your withdrawing money is: $%.2f\n", withdraw);

printf("****Your New Balance is: $%.2f\n\n", balance);

else {

printf("+++You don't have enough money+++\n");

printf("Please contact to your Bank Customer Services\n");

printf("****Your Balance is: $%.2f\n\n", balance);

return balance;

}//money withdraw

void menuExit() {

printf("--------------Take your receipt!!!------------------\n");

printf("-----Thank you for using ATM Banking Machine!!!-----\n");

printf("-----BROUGHT TO YOU BY itsourcecode.com-----\n");

}//exit menu

void errorMessage() {;

printf("+++!!!You selected invalid number!!!+++\n");

}//error message

/* Sample Output

******************Hello!*******************

**********Welcome to ATM Banking***********

****Please choose one of the options below****

< 1 > Check Balance

< 2 > Deposit

< 3 > Withdraw


< 4 > Exit

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Your Selection: 1

You Choose to See your Balance

****Your Available Balance is: $15000.00

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Would you like to do another transaction:

< 1 > Yes

< 2 > No

******************Hello!*******************

**********Welcome to ATM Banking***********

****Please choose one of the options below****

< 1 > Check Balance

< 2 > Deposit

< 3 > Withdraw


< 4 > Exit

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Your Selection: 2

You choose to Deposit a money

$$$$Your Balance is: $15000.00

****Enter your amount to Deposit

1444

****Your New Balance is: $16444.00

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Would you like to do another transaction:

< 1 > Yes

< 2 > No

******************Hello!*******************

**********Welcome to ATM Banking***********

****Please choose one of the options below****

< 1 > Check Balance

< 2 > Deposit

< 3 > Withdraw


< 4 > Exit

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Your Selection: 3

You choose to Withdraw a money

$$$$Your Balance is: $16444.00

Enter your amount to withdraw:

600000

+++You don't have enough money+++

Please contact to your Bank Customer Services

****Your Balance is: $16444.00

Enter your amount to withdraw:

14000

$$$$Your withdrawing money is: $14000.00

****Your New Balance is: $2444.00

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Would you like to do another transaction:

< 1 > Yes

< 2 > No

******************Hello!*******************

**********Welcome to ATM Banking***********

****Please choose one of the options below****

< 1 > Check Balance

< 2 > Deposit

< 3 > Withdraw


< 4 > Exit

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Your Selection: 4

--------------Take your receipt!!!------------------

-----Thank you for using ATM Banking Machine!!!-----

-----BROUGHT TO YOU BY itsourcecode.com!!!-----

Program ended with exit code: 0

*/

Downloadable Source Code

Click Here to Download the Source Code

Summary
This System Project With Source Code is being develop in C programming language, and this simple project can
enhance the knowledge of the beginners or the students to develop their skills in programming, also this project
is easy to understand the module and their variables.

Related Articles
ER Diagram for ATM System | Entity Relationship Diagram

ATM Program In Python With Source Code


Simple ATM Program in C++ with Source Code
Sequence Diagram For ATM System | UML

Activity Diagram for ATM Management System


ATM Project In Java With Source Code
ATM System Class Diagram | UML

Inquiries
If you have any questions or suggestions about ATM Machine C Program  , please feel free to leave a comment
below.

C Projects
School Billing System Project in C with Source Code
Department Store Management System Project in C

report this ad

1 thought on “C Program for ATM Machine With Source Code”

Deepkunj Dubya
July 18, 2021 at 5:51 am

So Many errors

As like &it; is with header files

Compiler show error

Reply

Leave a Comment
Name *

Email *

Website

Post Comment

Search

Programming Tutorials

• C Programming Tutorial

• C++ Tutorial

• Java Tutorial

• VB.NET Tutorial

• Python Tutorial

• PHP Tutorial

• MS Word Tutorial

• MS Excel Tutorial

Free Online Compilers

• FREE Online Compiler IDE

• C Online Compiler

• Python Online Compiler

• Online Java Compiler

• Online PHP Compiler

• Online VB.Net Compiler

• Bootstrap Online Compiler

• MySQL Online Compiler

• NodeJS Online Compiler

• JavaScript Online Compiler

• Online Ruby Compiler


• C++ Online Compiler

Recent Post

• The Ultimate Guide to the Slide Master in PowerPoint

• ModuleNotFoundError: No Module Named django_heroku [FIXED]

• How To Use An Excel Shortcut To Save As: An Easy Guide

• How To Change Powerpoint Slide Size A Step by Step Guide

• Modulenotfounderror: No Module Named Requests

• Shortcut To Cut Cell Value In Excel: Keyboard Shortcut

• How to Change Layouts in PowerPoint Guide

• The Ultimate Excel Shortcuts Cheat Sheet You Need To Know

• Modulenotfounderror: No Module Named Numpy [SOLVED]

• How to Change And Apply Powerpoint Backgrounds

• Modulenotfounderror: no module named apt_pkg

• Excel Paste Values Shortcut: A Comprehensive Guide

• A Beginners Guide How to Apply Themes In Powerpoint

• How To Create A Thermometer Chart In Excel In A Minute

• Modulenotfounderror: No Module Named pip_autoremove [FIXED]

• How To Delete a Slide in Powerpoint

• How to Add New Slide in Powerpoint Less Than A Minute

• Create Powerpoint Presentation With Step By Step Guide

• An Ultimate Powerpoint Tutorial for Beginners

• Keyboard Shortcuts For Highlighting In Excel: Quick And Easy

report this ad

Official Logo
Quick Links

About Us

Contact Us
Advertise With Us
Hire Us

Free Compilers

C Online Compiler
PHP Online Compiler
Python Online Compiler

Java Online Compiler

Follow

Home Contact Us About Us Hire Us Advertise Disclaimer Privacy Policy Terms and Agreement

© itsourcecode.com - 2022

You might also like