Next Gen Boards
 

Sponsored Links
Arcade YouTube vbBux / vbPlaza Calendar FAQ

Reply
 
Thread Tools Display Modes  
mameman2
Commander Grade 4
 
mameman2's Avatar
 
Join Date: Mar 2007
Location: in the shoutbox mostlikely
Posts: 554
Rep Power: 2 mameman2 is on a distinguished road Reputation: 17
Points: 301.00
Bank: 405,084.79
Total Points: 405,385.79
for giving me 60 bucks - cobrad for getting hacked - RezSide 
Boston Red Sox New England Patriots
mameman2 is offline
 
Send a message via AIM to mameman2Send a message via Yahoo to mameman2
 
#1
03-21-2008, 02:24 PM   #1
Reply With Quote
ATM system 3.0

I remade the program and added some better menus i still didnt fix the logical erros can someone please check it out?

Code:
// Declerations
#include "stdafx.h"
#include <iostream>
using namespace std;

int pinnumber;
int pinnumber2 = 1234;
int accountnumber;
int option1;
int doutput;  
int dinput;
double bal = 0.00;
double totalbal = bal + (dinput - doutput);
int y, Y, n, N;
int option2;
int option3;
int accnum = 1234;
int withdrawmax = 500;

// Functions in the program
int pinenter();
int menu();
int balance();
int withdraw();
int deposited();  
int passusrrec();
int leave();

int main()
{
	system("cls");
	system("color 09");
	system("TITLE Mameman's ATM system 3.0");
	cout << "Welcome to Mameman's ATM system!" << endl;
	cout << "Please Enter Your Account Number: ";
	cin >> accountnumber;
		if (accountnumber != 1234)
		{
			system("cls");
		cout << "Please Enter a Valid Account Number." << endl;
		system("pause");
        passusrrec();
		}
		pinenter();
}
	int pinenter()
	{
	if (accountnumber == 1234)
	{
		system("cls");
		cout << "Please Enter Your PIN Number: ";
		cin >> pinnumber;
		
		if (pinnumber != 1234)
		{
			system("cls");
		cout << "Please Enter a Valid Pin Number." << endl;
		system("pause");
		passusrrec();
		}
	}
	menu();
	return 0;
	}
	int menu()
	{
		if (pinnumber == 1234)
		{
			system("cls");
			cout << "			*********************************" << endl;
			cout << "			*	Main Menu:		*" << endl;
			cout << "			*********************************" << endl;
			cout << "			*	1 - View my Balance	*" << endl;
			cout << "			*	2 - Withdraw Cash	*" << endl;
			cout << "			*	3 - Deposit Cash	*" << endl;
			cout << "			*	4 - Exit		*" << endl;
			cout << "			*********************************" << endl;
			cout << "nPlease Choose An Option: ";
			cin >> option1;
			
			if (option1 == 1)
			{
				balance();
		    }
			if (option1 == 2)
			{
				withdraw();
		    }
            if (option1 == 3)
			{
				deposited();
			}
			if (option1 == 4)
			{
				leave();
			}
			else
			{
				system("cls");
				cout << "That Is Not A Choice Please Pick Another!" << endl;
				system("pause");
				menu();
			}

		}
		return 0;
	}
		int balance()
		{
			
				system("cls");
				cout << "You have Deposited " << dinput << " Dollars." << endl;
				cout << "You Have Withdrawn " << doutput << " Dollars." << endl;
				cout << "You Have " << bal + (dinput - doutput) << " Dollars." << endl;
				system("pause");
				menu();
				return 0;
		}
		int withdraw()
		{
			system("cls");
			cout << "Enter How Much Money You Want To Withdraw: ";
					cin >> doutput;
					if (doutput > withdrawmax)
					{
					cout << "You Cant Withdraw More Then $500 Per Visit" << endl;
					system("pause");
					withdraw();
					}
					if (doutput > bal)
				    {
					cout << "You Don't Have Enough Money to do That Please Pick a Smaller Amount" << endl;
					system("pause");
					withdraw();
				    }
					if (doutput <= bal)
					{
					cout << "You Withdrew " << doutput << " Dollars And You Have " << bal - (doutput - dinput) << " Left in Your Account" << endl;
					system("pause");
					menu();
					}
			return 0;
		}
int deposited()
{
				system("cls");
				cout << "Enter How Much Money You Want To Deposite: ";
				cin >> dinput;
				system("cls");
			cout << "You Deposited " << dinput << " Dollars And You Have " << bal + (doutput + dinput) << " Dollars in Your Account" << endl;
			system("pause");
			menu();
			return 0;
}
int passusrrec()
{

	system("cls");
	cout << "      ********************************************************************" << endl;
    cout << "      *     Have You Lost Your Account Number? Enter 1 To Recover It     *" << endl;
	cout << "      ********************************************************************" << endl;
	cout << "      *     Have You Lost Your PIN Number? Enter 2 To Recover It         *" << endl;
	cout << "      ********************************************************************" << endl;
	cout << "nEnter Your Choice: ";
    cin >> option3;

	if (option3 == 1)
	{
    system("cls");
	cout << "You Account number is " << accnum << "" << endl;
	system("pause");
	main();
	}

	if (option3 == 2)
	{
	system("cls");
	cout << "To Recover Your Pin Number You Will Need to Answer The Following Question" << endl;
	system("pause");
	system("cls");
	cout << "Who created this program?n" << endl;
	cout << "1 - Cobrad" << endl;
	cout << "2 - Mameman" << endl;
	cout << "3 - Bravo" << endl;
	cout << "4 - Beau" << endl;
	cout << "Enter Your Choice: ";
	cin >> option2;
	
	if (option2 == 1)
	{
	cout << "Wrong, Cobrad Cant Even Program" << endl;
	system("pause");
	passusrrec();
	}
    if (option2 == 2)
	{
	cout << "Correct, Mameman Wrote This" << endl;
	cout << "You PIN Number Is " << pinnumber2 << "" << endl;
	system("pause");
	main();
	}
    if (option2 == 3)
	{
    cout << "Wrong, Bravo Didn't Do This" << endl;
	system("pause");
	passusrrec();
	}
	if (option2 == 4)
	{
	cout << "Wrong, Beau Is Too Lazy" << endl;
	system("pause");
	passusrrec();
	}
    else
	{
	cout << "That Is Not A Choice, Pick Another Option" << endl;
	system("pause");
	passusrrec();
	}

	}
return 0;
}

int leave()
{
			
			system("cls");
			cout << "Good Bye, Please Come Again" << endl;
			system("pause");
			exit(2);
			return 0; 
}
there are some logical errors with the withdrawl and deposite and veiw balance part if u know how to fix please tell me cuz i am tryin to expand this progam as much as possible
__________________
DONT CLICK HERE

Quote:
[Today 08:54 PM] conrad127:we just abuse our powers and ban people
Quote:
[Today 09:04 PM] Tinsley85: no i'm a noob!!!
Quote:
[Today 10:22 PM] heavytech94: attack and brutally murder mamemam

Last edited by mameman2; 05-06-2008 at 04:47 PM..
Report Post
Bravo
Administrator
 
Bravo's Avatar
 
Join Date: May 2007
Location: Florida
Posts: 1,282
Rep Power: 10 Bravo has a spectacular aura aboutBravo has a spectacular aura about Reputation: 170
Points: 9,131.95
Bank: 7,270,597.18
Total Points: 7,279,729.13
u flippin pwn - italia1221 Bravo eats popcorn while pwning noobs - GoldenEagle No Message - jake8837 Bravo Love Donuts! - Oc LoG hell yeah it's stolen, thanks for helping me with my account issues! - 0ne_sh0t 
For the April fools joke - krizor PWNING n00bs AWARD HOORAH!!! - GoT...SNiPZ? Nice joke lol - flying Ham Here's money for you PS3 lol - RezSide Thanks for the monies! - matt51723 
Cops love donuts....right! - PressmanTrev For being a good administrator and helping me out. - lildegregs22 Thanks for being a hero - Waelzleb hey your cool - hasancod4 Thought you might wanna beer ;) - Caos 
World Trade Center Victims and Heroes - Fireworks Safety - Bravo World Trade Center Victims and Heroes - Fireworks Safety - Oc LoG World Trade Center Victims and Heroes - Fireworks Safety - Computergizmo 
USA Florida Marlins Miami Heat Florida Miami Dolphins Florida Panthers
Bravo is offline
 
Send a message via AIM to BravoSend a message via MSN to BravoSend a message via Yahoo to BravoSend a message via Skype™ to Bravo
 
#2
03-22-2008, 06:12 AM   #2
Reply With Quote
Wow, your actually starting to learn!
__________________
AKA: -K155-Bravo

Report Post
mameman2
Commander Grade 4
 
mameman2's Avatar
 
Join Date: Mar 2007
Location: in the shoutbox mostlikely
Posts: 554
Rep Power: 2 mameman2 is on a distinguished road Reputation: 17
Points: 301.00
Bank: 405,084.79
Total Points: 405,385.79
for giving me 60 bucks - cobrad for getting hacked - RezSide 
Boston Red Sox New England Patriots
mameman2 is offline
 
Send a message via AIM to mameman2Send a message via Yahoo to mameman2
 
#3
03-22-2008, 10:05 AM   #3
Reply With Quote
Yes bravo I've always been learning but now I've had more free time...although I still can't do somethings that I want to do
__________________
DONT CLICK HERE

Quote:
[Today 08:54 PM] conrad127:we just abuse our powers and ban people
Quote:
[Today 09:04 PM] Tinsley85: no i'm a noob!!!
Quote:
[Today 10:22 PM] heavytech94: attack and brutally murder mamemam

Last edited by mameman2; 03-22-2008 at 01:42 PM..
Report Post
manguy
Private Grade 1
 
Join Date: Mar 2008
Posts: 30
Rep Power: 0 manguy is on a distinguished road Reputation: 10
Points: 0.00
Bank: 32,004.42
Total Points: 32,004.42
manguy is offline
 
 
#4
05-04-2008, 07:58 PM   #4
Reply With Quote
what the point of it?
Report Post
mameman2
Commander Grade 4
 
mameman2's Avatar
 
Join Date: Mar 2007
Location: in the shoutbox mostlikely
Posts: 554
Rep Power: 2 mameman2 is on a distinguished road Reputation: 17
Points: 301.00
Bank: 405,084.79
Total Points: 405,385.79
for giving me 60 bucks - cobrad for getting hacked - RezSide 
Boston Red Sox New England Patriots
mameman2 is offline
 
Send a message via AIM to mameman2Send a message via Yahoo to mameman2
 
#5
05-04-2008, 09:25 PM   #5
Reply With Quote
the point of this is to show my some what good skills and just in case anybody needs something like this

*bump*
please chack it again i edited it and made it better


srry 4 the post
__________________
DONT CLICK HERE

Quote:
[Today 08:54 PM] conrad127:we just abuse our powers and ban people
Quote:
[Today 09:04 PM] Tinsley85: no i'm a noob!!!
Quote:
[Today 10:22 PM] heavytech94: attack and brutally murder mamemam

Last edited by mameman2; 05-06-2008 at 04:48 PM..
Report Post
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

top Go to Top All times are GMT -4. The time now is 04:48 PM.

Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 Copyright ©2006 - 2008, NextGenBoards. All Rights Reserved