Go Back   Novahq.net Forum > Computers > Web design and Programming
FAQ Community Calendar Today's Posts Search

Web design and Programming Discuss website creation and other programming topics.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-30-2004, 05:02 PM
BOne is offline BOne
Registered User

Join Date: Aug 2003
Posts: 1,640

Send a message via ICQ to BOne Send a message via Yahoo to BOne
eek no GFX here

posted below is a C++ program that will manage you checking account...

// this is a simple C++ program..try finding a compiler and give this code a go! for keeping track of your dough

#include (iostream)
#include (iomanip)
#include (cstdlib)

using namespace std;

int main()
{

// DECLARE VARIABLES

double ACCOUNT_BALANCE,
FINAL_BALANCE,
DEPOSIT,
CHECK,
WITHDRAWAL,
TOTAL_DEPOSIT,
TOTAL_CHECK,
TOTAL_WITHDRAWAL;

int MENU_RESPONSE;



// INITIALIZE

ACCOUNT_BALANCE = FINAL_BALANCE = DEPOSIT = CHECK = WITHDRAWAL =
TOTAL_DEPOSIT = TOTAL_CHECK = TOTAL_WITHDRAWAL = 0;



// set precision to 2

cout << setprecision(2)
<< setiosflags(ios::fixed)
<< setiosflags(ios::showpoint);



// get user inout

cout << "\nEnter opening balance: ";
cin >> ACCOUNT_BALANCE;



// OBTAIN INPUT DATA

cout << "\n\nENTER:";
cout << "\nD or d for DEPOSIT";
cout << "\nC or c for CHECK";
cout << "\nW or w for WITHDRAWAL";
cout << "\nQ or q to QUIT";
cout << "\n ";
MENU_RESPONSE = cin.get();

// PERFORM SWITCH

switch (MENU_RESPONSE)
{
case 'D':
case 'd':
cout << "\nEnter DEPOSIT: ";
cin >> DEPOSIT;
ACCOUNT_BALANCE += DEPOSIT;
TOTAL_DEPOSIT += DEPOSIT;
cout << "\n\nENTER:";
cout << "\nD or d for DEPOSIT"; cout << "\nC or c for CHECK";
cout << "\nW or w for WITHDRAWAL";
cout << "\nQ or q to QUIT";
cout << "\n ";
break;


case 'C':
case 'c':
cout << "\nEnter CHECK: ";
cin >> CHECK;
ACCOUNT_BALANCE -= CHECK;
TOTAL_CHECK += CHECK;
cout << "\n\nENTER:";
cout << "\nD or d for DEPOSIT";
cout << "\nC or c for CHECK";
cout << "\nW or w for WITHDRAWAL";
cout << "\nQ or q to QUIT";
cout << "\n ";
break;


case 'W':
case 'w':
cout << "\nEnter WITHDRAWAL: ";
cin >> WITHDRAWAL;
ACCOUNT_BALANCE -= WITHDRAWAL;
TOTAL_WITHDRAWAL += WITHDRAWAL;
cout << "\n\nEnter:";
cout << "\nD or d for DEPOSIT";
cout << "\nC or c for CHECK";
cout << "\nW or w for WITHDRAWAL";
cout << "\nQ or q to QUIT";
cout << "\n ";
break;


case 'Q':
case 'q':
cout << "\n\nOPENING BALANCE: " << setw(12) << "$"
<< ACCOUNT_BALANCE;
cout << "\nTOTAL DEPOSIT: " << setw(12) << "$"
<< TOTAL_DEPOSIT;
cout << "\nTOTAL CHECKS: " << setw(12) << "$"
<< TOTAL_CHECK;
cout << "\nTOTAL WITHDRAWALS: " << setw(12) << "$"
<< TOTAL_WITHDRAWAL;
cout << "\n ---------------";

FINAL_BALANCE = ACCOUNT_BALANCE + TOTAL_DEPOSIT -
TOTAL_CHECK - TOTAL_WITHDRAWAL;
cout << "\nFINAL BALANCE: " << setw(12) << "$"
<< FINAL_BALANCE;
break;


default:
cout << "\nInvalid Response! Try again";
exit(1);
break;
}
return 0;

}
__________________
=====Retired sig team member=====
Reply With Quote
  #2  
Old 10-30-2004, 05:08 PM
Skin is offline Skin
Registered User

Join Date: Dec 2003
Posts: 2,911

Send a message via ICQ to Skin
your just adding to my confusion...

__________________
Skin18 DevaintArt | Brushes Created by ME |

Sex, Drugs & Rock n' Roll
Reply With Quote
  #3  
Old 10-30-2004, 05:19 PM
.ringer. is offline .ringer.
Registered User

Join Date: Feb 2004
Posts: 5,473

i just got dumber from looking at that...


dumber...is that even a word?
__________________
-o l d e s t-
Reply With Quote
  #4  
Old 10-30-2004, 05:29 PM
Skin is offline Skin
Registered User

Join Date: Dec 2003
Posts: 2,911

Send a message via ICQ to Skin
no its dumberer
__________________
Skin18 DevaintArt | Brushes Created by ME |

Sex, Drugs & Rock n' Roll
Reply With Quote
  #5  
Old 10-30-2004, 05:33 PM
.ringer. is offline .ringer.
Registered User

Join Date: Feb 2004
Posts: 5,473

oh, right!
__________________
-o l d e s t-
Reply With Quote
  #6  
Old 10-30-2004, 07:03 PM
Systemkaos is offline Systemkaos
Registered User

Join Date: Jul 2003
Posts: 1,736

Send a message via ICQ to Systemkaos
wow you do that your self, cuz there is ways to shorten it

finaly some one posts something i know about
Reply With Quote
  #7  
Old 10-30-2004, 08:04 PM
IcIshoot is offline IcIshoot

Join Date: Mar 2004
Location: Farmington Hills, MI
Posts: 1,473

Send a message via AIM to IcIshoot Send a message via MSN to IcIshoot Send a message via Yahoo to IcIshoot
I did that once in Qbasic. Used it for a full year.

looks pretty good.

Now you need to add a nice user interface

IcI
Reply With Quote
  #8  
Old 10-30-2004, 10:38 PM
.enfo. is offline .enfo.
Registered User

Join Date: Jul 2003
Posts: 3,465

Send a message via ICQ to .enfo.
no its mor e dumb, uh, eh
so, who knows what the hell bone is talking about
__________________


Supporter > < Supporter
Quote:
Originally posted by A TIN OF GAS
enfo... u suck!

p.s. love ya really enfo
Reply With Quote
  #9  
Old 11-01-2004, 09:30 AM
BOne is offline BOne
Registered User

Join Date: Aug 2003
Posts: 1,640

Send a message via ICQ to BOne Send a message via Yahoo to BOne
Quote:
Originally posted by Systemkaos
wow you do that your self, cuz there is ways to shorten it

finaly some one posts something i know about
yup thazt code all mine.....yeah my instructor had a 1 page code that did all my stuff as well...made me look

i love coding in C++...but visual basic.net is groovie too
__________________
=====Retired sig team member=====
Reply With Quote
  #10  
Old 11-01-2004, 09:31 AM
BOne is offline BOne
Registered User

Join Date: Aug 2003
Posts: 1,640

Send a message via ICQ to BOne Send a message via Yahoo to BOne
Quote:
Originally posted by Skin
your just adding to my confusion...

get with me skin...coding action script is bout the same
__________________
=====Retired sig team member=====
Reply With Quote
  #11  
Old 11-08-2004, 12:25 PM
BOne is offline BOne
Registered User

Join Date: Aug 2003
Posts: 1,640

Send a message via ICQ to BOne Send a message via Yahoo to BOne
Quote:
Originally posted by icishoot
I did that once in Qbasic. Used it for a full year.

looks pretty good.

Now you need to add a nice user interface

IcI

lol..good idea..make my own MS money app lol
__________________
=====Retired sig team member=====
Reply With Quote
  #12  
Old 11-08-2004, 03:56 PM
IcIshoot is offline IcIshoot

Join Date: Mar 2004
Location: Farmington Hills, MI
Posts: 1,473

Send a message via AIM to IcIshoot Send a message via MSN to IcIshoot Send a message via Yahoo to IcIshoot
I was going to write one in vb.net, but never got around to doing it.

I like Visual Basic.net (or C#.net) better then c++ because I don't have to type out the needed code to make windows and buttons, ect..

IcI
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 new gfx Lucky Sigs and Graphics 4 02-20-2006 11:01 AM
W-GFX DogSoldier~MLK~ Sigs and Graphics 0 12-03-2003 03:42 PM
my new gfx secretx Sigs and Graphics 3 11-27-2003 09:36 AM
M-GFX DogSoldier~MLK~ Sigs and Graphics 0 10-26-2003 04:34 PM
My GFX thisoneguy Sigs and Graphics 18 10-16-2003 01:38 PM


All times are GMT -5. The time now is 01:09 AM.




Powered by vBulletin®