0% found this document useful (0 votes)
54 views3 pages

Int Balance1 5000, Withdraw, Deposit Char Yesorno, Option, Language String Pincode1

This document outlines the logic flow for an ATM program with the following functionality: 1) The user is prompted to select their language and enter their PIN. If the PIN is incorrect after 5 attempts, the ATM is blocked. 2) The user is shown their balance and given options to perform transactions like withdrawals, deposits, and exiting. Validation checks are performed on transaction amounts. 3) Transaction success or failure messages are displayed and the user's balance is updated accordingly before prompting if they want to continue using the ATM.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views3 pages

Int Balance1 5000, Withdraw, Deposit Char Yesorno, Option, Language String Pincode1

This document outlines the logic flow for an ATM program with the following functionality: 1) The user is prompted to select their language and enter their PIN. If the PIN is incorrect after 5 attempts, the ATM is blocked. 2) The user is shown their balance and given options to perform transactions like withdrawals, deposits, and exiting. Validation checks are performed on transaction amounts. 3) Transaction success or failure messages are displayed and the user's balance is updated accordingly before prompting if they want to continue using the ATM.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Start

Int balance1=5000,withdraw,deposit;
char YesOrNo, option, language;
string pincode1;

Select Language
[1]English [2]Filipino

Else If
Y “Welcome to our atm”
language
==’1’ “Enter your PIN”

If
“Maligayang Pag dating pincode1

A
saming ATM” Else If ==”123456

Y language
“Ilagay ang iyong PIN”
==’2’
N

i=5
N
else

N
i>0 “ATM BLOCK”
Left”
i=i-1 i=6
Y
1
“Attempts Left”

Y i>0

i=i-1
N
1
END

END
A

aas
“Welcome to our atm”
“Choose Transaction”
“[1]Balance inquiry [2]Cash Withdraw”
“[3]Cash Deposit [4]Exit “
A A

“Your “Do you want If


Y Y
case ‘1’: Balance another YesOrNo
is: “ transcation? ==’1’
[1] Yes [2] No “
N
N
Y “Withdraw”
case ‘2’:
“Enter Amount”

Else If
N YesOrNo Y “Thank you”
While (!(cin>>withdraw) || ==’2’

Y (withdraw%100!=0) ||
case ‘3’:
(withdraw>balance1) || END

(withdraw<=0 ) ) N
N
B 1 else “INVALID”

“Confirm”
case ‘4’: Y
“[1]Yes [2]No”
END

N C
Invalid If
Y
YesOrNo
==’2’

i=0 Else If balance1=


N Y
pincode balance1-
“Enter PIN” ==”1234
56”
withdraw

i<20 Else If
Y N “your remaining”
YesOrNo
“You withdraw”
==’1’
i=4
“Choose
A
the right”
i=i-1 Y
Invalid i>0 “Invalid PIN”
1 Left”
Option.
i=i+1
Exit N
END

“Attempts Left”
END
B C

“Deposit” “Are you sure do If Y “THANK YOU


“Enter Amount” you want to exit? YesOrNo FOR USING
[1] Yes [2] No “ ==’1’ OUR ATM”

while ( !(cin>>deposit ) || N END

(deposit%100!=0) ||
(deposit<=0 ) )

Y
Else If
YesOrNo

A
“Confirm” ==’2’
“[1]Yes [2]No”

N
else
If Y
YesOrNo
==’2’

END
“INVALID”

If If balance1 =
Y “Enter PIN” pincode Y
YesOrNo balance1 + withdraw
==”1234
==’1’
56”

“Your New Balance”

A
“You Deposit”

Invalid i=4
i=i+1
Option.
Exit 1 Y
i>0 “Invalid PIN”
Left”
END

N END

“Attempts Left”

You might also like