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