Im not good in english so please bare with me. THANKS
Hi guys, i already created a not so perfect and ideal ATM program in C++
its running okay but i have some major problem i can't figure out.
MY PROBLEM IS : I want to create a ATM that can only withdraw hundred of amount OR a thousand with hundred.
example. i have 10,000 in my savings. and i want the ATM to only withdraw
with 100,200,300,400,500,600,700,800,900,1000,1100,1200 and so on...
this is what i got at the moment. THANKS IN ADVANCE !
using namespace std;
int balance = 10000;
cout << "Welcome To Simple ATM\n" <<endl;
cout << "Please Select Transaction" <<endl;
cout << "Select 1 or 2 "<< endl;
cout << "1. Balance Inquiry" <<endl;
cout << "2. Withdraw" <<endl;
cin >> choice;
cout << "Your Total Balance is: " << balance <<endl;
cout << "Please input the amount you want to withdraw" <<endl;
cin >> amount;
cout << "Insufficient Amount" <<endl;
cout << " INVALID AMOUNT " << endl;
total = balance - amount;
cout << "Your total balance is: " << total <<endl;
cout << "TRY AGAIN \n" <<endl;
cout << "Try AGAIN \n" <<endl;
can someone help me solve my problem in C++ ( ATM)
Post a Reply
|Oldest Newest Rating|
Used in many types of software including music players, video games, and many large scale applications.
|Bucky Roberts Administrator|