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
05-09-2008, 07:07 PM   #1
Reply With Quote
ATM system 4.0

i fixed the logical errors there is nothing wrong with it but any improvements are appreciated leave comments =)


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

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

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


int main()
{
	colorselect();
	return 0;
}

int colorselect()
{
	system("cls");
	system("color 09");
	system("TITLE Mameman's ATM system 4.0");
    cout << "		What Colors Would You Like This To Be In?" << endl;
	cout << "			****************************" << endl;
    cout << "			*     1 - Blue             *" << endl;
    cout << "			*     2 - Bright White     *" << endl;
	cout << "			*     3 - Bright Red       *" << endl;
	cout << "			*     4 - Random           *" << endl;
	cout << "			****************************" << endl;
	cin >> colorselect1;
	mainmenu();
	return 0;
	}

int mainmenu()
{
    
	if (colorselect1 == 1)
	{
	system("color 09");
	}
	if (colorselect1 == 2)
	{
	system("color 0f");
	}
	if (colorselect1 == 3)
	{
	system("color 0c");
	}
	if (colorselect1 == 4)
	{
	system("color 09");
	}
	system("cls");
	system("TITLE Mameman's ATM system 4.0");
	cout << "Welcome to Mameman's ATM system!" << endl;
	cout << "Since This Is Your First Time We Started You Off With $100" << endl;
    cout << "Please Enter Your Account Number: ";
    cin >> accountnumber;
	    if (accountnumber != 1234)
		{
			system("cls");
		cout << "Please Enter a Valid Account Number." << endl;
		system("@ping.exe 127.0.0.1 -n 5 -w 1000 > nul");
        passusrrec();
		}
    cout << "Please Enter Your PIN Number: ";
    cin >> pinnumber;
		if (pinnumber != 1234)
		{
			system("cls");
		cout << "Please Enter a Valid Pin Number." << endl;
		system("@ping.exe 127.0.0.1 -n 5 -w 1000 > nul");
		passusrrec();
		}
	
	menu();
	return 0;
	}

	int menu()
	{
		
	      	if (colorselect1 == 4)
	        {
	        system("color 0f");
	        }
			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 - Change Color	*" << endl;
			cout << "			*	5 - 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)
			{
				colorselect();
			}
			if (option1 == 5)
			{
			    leave();
			}
			else
			{
				system("cls");
				cout << "That Is Not A Choice, Please Pick Another!" << endl;
				system("@ping.exe 127.0.0.1 -n 4 -w 1000 > nul");
				menu();
			}

		
		return 0;
	}

		int balance()
		{
	      		if (colorselect1 == 4)
	            {
	            system("color 0c");
	            }
			    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()
		{
			if (colorselect1 == 4)
	        {
	        system("color 02");
	        }
			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("@ping.exe 127.0.0.1 -n 4 -w 1000 > nul");
					withdraw();
					}
					if (doutput > bal)
				    {
					cout << "You Don't Have Enough Money to do That Please Pick a Smaller Amount" << endl;
					system("@ping.exe 127.0.0.1 -n 6 -w 1000 > nul");
					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()
{
	        if (colorselect1 == 4)
	        {
	        system("color 08");
	        }
				system("cls");
				cout << "Enter How Much Money You Want To Deposit: ";
				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()
{

	if (colorselect1 == 4)
    {
	system("color 01");
	}
	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("@ping.exe 127.0.0.1 -n 3 -w 1000 > nul");
	passusrrec();
	}

	}
return 0;
}

int leave()
{
            if (colorselect1 == 4)
	        {
	        system("color 09");
	        }			
			system("cls");
			cout << "Good Bye," << endl;
			system("@ping.exe 127.0.0.1 -n 2 -w 1000 > nul");
			cout << "Please Come Again" << endl;
			system("@ping.exe 127.0.0.1 -n 2 -w 1000 > nul");
			exit(2);
			return 0; 
}
__________________
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
Report Post
niemira1551
Colonel Grade 3
 
niemira1551's Avatar
 
Join Date: Jul 2007
Location: Ohio
Posts: 647
Rep Power: 2 niemira1551 is on a distinguished road Reputation: 14
Points: 1,704.67
Bank: 0.10
Total Points: 1,704.77
No Message - niemira1551 i deserve a medal - niemira1551 YES!!1!!11!11111 - Versus i will marry you ! - Oc LoG 
Gay and Lesbian Pride - Oc LoG 
niemira1551 is offline
 
Send a message via AIM to niemira1551
 
#2
05-10-2008, 01:48 PM   #2
Reply With Quote
i dont get it what is it??
__________________


Report Post
jjcc4
Sergeant Grade 3
 
jjcc4's Avatar
 
Join Date: Feb 2008
Posts: 92
Rep Power: 1 jjcc4 is on a distinguished road Reputation: 10
Points: 38,516.22
Bank: 2,827.69
Total Points: 41,343.91
jjcc4 is offline
 
Send a message via MSN to jjcc4
 
#3
05-15-2008, 06:52 PM   #3
Reply With Quote
how can i use it..?
Report Post
Matt51723
General Grade 1
 
Matt51723's Avatar
 
Join Date: Apr 2007
Posts: 1,102
Rep Power: 3 Matt51723 is on a distinguished road Reputation: 16
Points: 11,830.41
Bank: 135,252.53
Total Points: 147,082.94
Syracuse Detroit Red Wings
Matt51723 is offline
 
Send a message via AIM to Matt51723Send a message via Yahoo to Matt51723
 
#4
05-15-2008, 07:09 PM   #4
Reply With Quote
It looks like a little fake ATM or something. Nice program, now just make it in an exe file lol.
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-16-2008, 08:22 PM   #5
Reply With Quote
matt i already compiled it lol and ummm working on 5.0 now
__________________
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
Report Post
Matt51723
General Grade 1
 
Matt51723's Avatar
 
Join Date: Apr 2007
Posts: 1,102
Rep Power: 3 Matt51723 is on a distinguished road Reputation: 16
Points: 11,830.41
Bank: 135,252.53
Total Points: 147,082.94
Syracuse Detroit Red Wings
Matt51723 is offline
 
Send a message via AIM to Matt51723Send a message via Yahoo to Matt51723
 
#6
05-16-2008, 08:32 PM   #6
Reply With Quote
Yeah you can use it through a compiler but thats stupid because it will displayed through the DOS. If you make it an actual program its more fun.
Report Post
jjcc4
Sergeant Grade 3
 
jjcc4's Avatar
 
Join Date: Feb 2008
Posts: 92
Rep Power: 1 jjcc4 is on a distinguished road Reputation: 10
Points: 38,516.22
Bank: 2,827.69
Total Points: 41,343.91
jjcc4 is offline
 
Send a message via MSN to jjcc4
 
#7
05-17-2008, 02:19 PM   #7
Reply With Quote
where do oyu have to put the text in notepad or what..?
Report Post
Matt51723
General Grade 1
 
Matt51723's Avatar
 
Join Date: Apr 2007
Posts: 1,102
Rep Power: 3 Matt51723 is on a distinguished road Reputation: 16
Points: 11,830.41
Bank: 135,252.53
Total Points: 147,082.94
Syracuse Detroit Red Wings
Matt51723 is offline
 
Send a message via AIM to Matt51723Send a message via Yahoo to Matt51723
 
#8
05-17-2008, 02:22 PM   #8
Reply With Quote
You can do a google search for a c++ compiler and then put the code and press compile and run 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
 
#9
05-17-2008, 10:32 PM   #9
Reply With Quote
i know matt but i dont know how to make the cool windows explorer ones yet lol if u know how then teach me
__________________
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
Report Post
Matt51723
General Grade 1
 
Matt51723's Avatar
 
Join Date: Apr 2007
Posts: 1,102
Rep Power: 3 Matt51723 is on a distinguished road Reputation: 16
Points: 11,830.41
Bank: 135,252.53
Total Points: 147,082.94
Syracuse Detroit Red Wings
Matt51723 is offline
 
Send a message via AIM to Matt51723Send a message via Yahoo to Matt51723
  05-17-2008, 10:34 PM   #10
Reply With Quote
I had the program to do it but I lost it when I had to reformat, if I come by a good one I'll show you.
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