0% found this document useful (0 votes)
83 views9 pages

WORKING OF ATM MACHINE USING C.PDF Code Blocks

Uploaded by

madhukallali8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views9 pages

WORKING OF ATM MACHINE USING C.PDF Code Blocks

Uploaded by

madhukallali8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

WORKING OF ATM MACHINE USING C

• TEAM:

• MADHUSUDANA (N-39)
• LAVANYA G (N-33)
• PADMINI S (N-54)
INTRODUCTION:-
❖ Machine at a bank branch or other location which enables a
customer toperform basic banking activities (checking ones
balance, withdrawing or transferring funds) even when the
bank is closed.
❖ This machine also allows to check their account at any time
and without the need for a human teller.
❖ Suppose You are short on cash , so you walk over to the
automated teller machine (ATM) , insert your card into the
card reader ,respond to the prompts on the screen , and
within a minute you walk away with your money and a
receipt in a few minutes.
ACKNOWLEDGEMENT
We would like to extend my gratitude to the principal Sir “Dr.Sanjay jain”
and vice principal sir “Dr.B.Narasimha murthy” and also our HODs
“Dr.Raveesha K H” and “Dr.Fazlur Rahaman” for providing us with all
the facility that was required for this project we would like to express
our special thanks of gratitude to our beloved teachers and seniors for
their able guidance and support in completing our project.

GROUP MEMBERS:
• MADHUSUDANA(N-39)
• LAVANYA G(N-33)
• PADMINI S(N-54)
DECLARATION BY THE CANDIDATES
• We hereby declare that that the project entitled “WORKING OF ATM
MACHINE using C programming” is an outcome of our own efforts
under the guidance of our seniors.
• This project is submitted to CMR Institute of technology .
PROGRAMME CODE :-
#include <stdio.h>
#include<conio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

void login();
void mainMenu();
void checkBalance(float balance);
float moneyDeposit(float balance);
float moneyWithdraw(float balance);
void menuExit();
void errorMessage();
int main() {
int option;
float balance = 25000.00;
int choose;
bool again = true;

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;
}
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");
}
void checkBalance(float balance) {
printf("You Choose to See your Balance\n");
printf("\n\n****Your Available Balance is: Rs%.2f\n\n", balance);
}
float moneyDeposit(float balance) {
float deposit;
printf("You choose to Deposit a money\n");
printf("$$$$Your Balance is: Rs%.2f\n\n", balance);
printf("**Enter your amount to Deposit\n");
scanf("%f", &deposit);

balance += deposit;
printf("\n****Your New Balance is: Rs%.2f\n\n", balance);
return balance;
}
float moneyWithdraw(float balance) {
float withdraw;
bool back = true;
printf("You choose to Withdraw a money\n");
printf("Your Balance is: Rs%.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: Rs%.2f\n", withdraw);
printf("**Your New Balance is: Rs%.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: Rs%.2f\n\n", balance);
}
}
return balance;

}
void menuExit() {
printf("--------------Take your receipt!!!------------------\n");
printf("-----Thank you for using ATM Banking Machine!!!-----\n");

}
void errorMessage() {;
printf("+++!!!You selected invalid number!!!+++\n");

getch();
}

OUT PUT : -
Conclusion :-
❖ This concludes the C programming lesson.
❖ We hope this will be useful for interface of ATM machines

******Thank you*******

You might also like