-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBanck.cpp
68 lines (52 loc) · 1.41 KB
/
Banck.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include <iostream>
using namespace std;
int main()
{
string email;
int passw;
string name;
cout<<"enter your name: ";
cin>>name;
cout<<"welccom "<<name<<endl;
cout<<"enter your email: ";
cin>>email;
cout<<"enter you password: ";
cin>>passw;
while(passw!=1234){
if( passw!=1234){
cout<<"tree againe: ";
cin>>passw;
}
else{
cout<<"welcoum "<<name<<endl;
cout<<"your passworde is: "<<passw;
}
}
//home
char user;
int nember;
int nember2;
while(true){
cout<<"Enter (A) letter to add money to your account: "<<endl;
cout<<"Enter the letter (B) to withdraw money from your account:"<<endl;
cin>>user;
if(user== 'A'){
cout<<"Enter your money: ";
cin>>nember;
cout<<"you have: "<<nember<<"$"<<endl;
}
else if(user=='B')
{
if (nember<=0){
cout<<"you Dont have money in you'r account"<<endl;
}else{
cout<<"Type how much you want to withdraw: "<<endl;
cin>>nember2;
cout<<"now you have: "<<nember-nember2<<endl;
}
}else if (user!='A'&&user!='B'){
cout<<"Enter (A) or (B)"<<endl;
}
}
}
// password is : 1234