Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- bool valid (int, int);
- bool password (int, int, int );
- int currency (int, int);
- char ticket();
- void main()
- {
- int username, password, flag, True, w, x, y, z, ans;
- cout<<"Enter your username and password";
- cin>>username
- >>password;
- do{
- cout<<"Incorrect input\n Your password or username is incorrect"
- <<"Enter username and password: ";
- cin>>username
- >>password;}while(password != 1002 && password != 1065 && password != 4569);
- cout<<valid(w)
- <<password(x,y,z);
- cout<<"Would you like your cash in lira or $ ?";
- cin>>ans;
- }
- bool valid(int w)
- {
- //how to check if it is a 4 digit number
- }
- bool password (int x, int y, int z)
- {
- int password, answer, flag, True, False;
- while(answer != -1)
- {
- if(password == 1002)
- flag = True;
- else if(password == 1065)
- flag = True;
- else if(password == 4569)
- flag = True;
- else
- flag = False;
- cout<<"Re-enter your password or enter -1 to quit:";
- cin>>password;
- }
- }
- int currency (int amount)
- {
- int amount;
- cout<<"Choose which amount you would like to withdraw:\n";
- if(amount == lira)
- cout<<" 1- $20, $60, $100";
- cin>>amount;
- else
- cout<<" 2- LBP 20000, LBP 60000, LBP 100000";
- cin>>amount;
- }
- char ticket()
- {
- cout<<"Username: "
- <<"Date: "
- <<"Time:
- <<"Amount withdrawn: "
- <<"Amount remaining in the vault: "<<"$500000-currency(amount);
- }
Add Comment
Please, Sign In to add comment