Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

TRIBHUVAN UNIVERSITY

INSTITUTE OF ENGINEERING
CENTRAL CAMPUS,PULCHOWK

A Course Project submitted to


the Department of Electronis and Computer Engineering in partial fulfillment
of the requirements for the practical course on Computer programming

PROJECT ON
ATM Machine

SUBMITTED BY: SUBMITTED TO:

Ram Bahadur Rithal (080BCE118) Er.Anku Jaiswal


Rahul Jaiswal (080BCE114) The Department Of Electronics and
Rahul Jha (080BCE115) Computer Engineering ,pulchowk
Sagar Paudel (080BCE ) Campus,lalitpur
Sagar Dhami (080BCE )
Rabi Roshan (080BCE )
Section : EF
Institute of Engineering

TABLE OF CONTENT PAGE NO:

Acknowledgement--------------------------------------------------------------------------------------------------1

Abstract----------------------------------------------------------------------------------------------------------------2

Introduction----------------------------------------------------------------------------------------------------------3

Objectives-------------------------------------------------------------------------------------------------------------4

Algorithm-----------------------------------------------------------------------------------------------------------5-

Flowchart-----------------------------------------------------------------------------------------------------------

Source code--------------------------------------------------------------------------------------------------------

Output--------------------------------------------------------------------------------------------------------------

Discussion----------------------------------------------------------------------------------------------------------
ACKNOWLEDGEMENT
ABSTRACT

INTRODUCTION
OBJECTIVES
ALGORITHM:
Step 1: Start

- Include the standard input-output header file.

Step 2: Define Functions

- Define four functions: displayMenu, checkBalance, deposit, withdraw.

Step 3: Declare Main Function

- Declare the main() function.

- Declare variables: choice, balance.

- Initialize balance to 1000.

Step 4: Main Program Execution

- Begin a loop until choice is 4.


- Display the menu options.
- Prompt the user for their choice.
- Switch based on the user's choice:
- Case 1: Call checkBalance function with balance.
- Case 2: Prompt the user for the deposit amount, call deposit function with
balance and deposit amount, update balance.
- Case 3: Prompt the user for the withdrawal amount, call withdraw function
with balance and withdrawal amount, update balance.
- Case 4: Print goodbye message, exit loop.
- Default: Print invalid choice message.
- End loop.
Step 5: Return Statement
- Return 0 to indicate successful execution of the program.

Step 6: Define displayMenu Function


- Print menu options.

Step 7: Define checkBalance Function


- Print current balance.

Step 8: Define deposit Function


- Add the deposit amount to balance.
- Print deposit success message.
- Return updated balance.

Step 9: Define withdraw Function


- If balance is sufficient, subtract the withdrawal amount from balance.

- Print withdrawal success message.

- If balance is insufficient, print an error message.

- Return updated balance.

Step 10: End


SOURCE OF CODE FOR MAKING ATM MACHINE SYSTEM USING C PROGRAMMING LANGUAGE

#include <stdio.h>
// Function to display the main menu

void displayMenu()
{
printf("\n******** Welcome to MyBank ATM ********\n");
printf("1. Check Balance\n");
printf("2. Deposit\n");
printf("3. Withdraw\n");
printf("4. Exit\n");
printf("***************************************\n");
}

// Function to check balance

void checkBalance(float balance)


{
printf("\nYour current balance is: $%.2f\n", balance);
}

// Function to deposit money

float deposit(float balance, float amount)


{
balance += amount;
printf("\n$%.2f deposited successfully!\n", amount);
return balance;
}

// Function to withdraw money


float withdraw(float balance, float amount)
{
if (balance >= amount)
{
balance -= amount;
printf("\n$%.2f withdrawn successfully!\n", amount);
}
else
{
printf("\nInsufficient balance!\n");
}
return balance;
}
int main()
{
int choice;
float balance = 1000.0; // Starting balance

do {
displayMenu();
printf("Enter your choice: ");
scanf("%d", &choice);

switch(choice){
{
case 1:
checkBalance(balance);
break;
}
case 2:
{
float amount;
printf("Enter amount to deposit: $");
scanf("%f", &amount);
balance = deposit(balance, amount);
break;
}
case 3:
{
float amount;
printf("Enter amount to withdraw: $");
scanf("%f", &amount);
balance = withdraw(balance, amount);
break;
}
case 4:

printf("Thank you for using MyBank ATM. Goodbye!\n");


break;
default:
printf("Invalid choice. Please try again.\n");
}
} while (choice != 4);
return 0;

}
CODE IMAGE
OUTPUT SCREENSHOT:

This is the home screen of our program or atm machine system


When we enter the choice 1,2,3,4 we will get their respective functions whose
screenshorts are given below:

When we choose choice 1:


We will get current balance in the account
When we choose choice 2
We can deposite balance in account

When we choose the choice 1:


We can see new balance in account:
When we choose the choice 3:
We can withdraw balance from the account:

When we choose the choice 1:


We can see new balance in account:
When we enter the choice 4:
We will exit from system

CONCLUSION:

The main purpose of our project is to give the general knowledge about ATM MACHINE
system . By working very hard on this project ,we got proper formate and working principle of
ATM System. Here,we got various types of difficulties on project like debugging ,limiting time for
this project ,logical thinking. So we couldn’t provide desired output.

This project promates us for making syntax and logical part of programming so strong used for
specific application, guiding on group worked together and makes us intresting on programming
to do something. Hence this project underscores the significance of working principle of ATM
MACHINE System and student’s creative and applicable skills and activities on project.
REFERENCE:

 https//ezexplation,com/
 Past project
 Group DISCUSSION
 Class note sources

You might also like