English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Can someone help me figure out how to create a credit card program? I just finished a assignment where I had to create a coke machine and make it run but i cannot figure this one out.

2007-06-07 16:22:33 · 3 answers · asked by Anonymous in Computers & Internet Programming & Design

similiar to this one I wrote for the coke machine. I could not post it all because of the word limit.

#include
#include

/************************************
************************************/
float MoneyCollected = 0.0; /* global variable */
int selection = 0;
float AcceptMoney ();//function definition
int display (); // function definition
int dispense (); // function definition
void Pause (int); // function defintion


/***********************************
***********************************/
main()
{
float fDeposit = 0.0;
float fTotalDeposit = 0.0;
float fRemaining = 0.0;
int iMenuChoice = 0;
int count = 0;

fDeposit = AcceptMoney(); //sets fDeposit equals deposit
fTotalDeposit = fDeposit; //sets fTotalDeposit equal to current deposit

for (count = 0; count < 20; count++)
{
if (MoneyCollected < 1.0) //this IF block will be repeated 20 times to account for all amounts of deposit chaned to MoneyCollected

2007-06-07 16:47:12 · update #1

3 answers

Isn't this an ATM program rather than a credit card program?

User inserts credit card.
Program validates credit card and requests pin for authorisation.
if valid
program gives options available.
Balance or withdrawal.

That should do it.

2007-06-07 20:21:32 · answer #1 · answered by AnalProgrammer 7 · 0 0

Well first you'd have to write/scripts a program such as using Visual Basics, But any hoot.. If you need a processor I recommend CCBill to complete all your credit card needs.

2007-06-07 23:35:41 · answer #2 · answered by redworm2k2 3 · 0 0

What do u mean by credit card program?!!! :-o

2007-06-07 23:29:47 · answer #3 · answered by Deepak 4 · 1 0

fedest.com, questions and answers