Seems to have this Debug error when i try to run it, not sure how to solve.
Code:#include <iostream> using namespace std; double everything; float a; float b; inline void balance(void) { cout<<"You have a total of: Lm"<<everything; } inline void intro(void) { cout<<"~~~~BANK ACCOUNT ORGANIZER~~~~\n"; cout<<"\nBank Account Organizer will organize your bank account. You can withdraw money from your bank account or you may also choose to deposit money into your bank account. \nYou can check your account balance if you need to do so!\n"; } inline void balancenote(void) { int money; int five2; int one; int five; int ten; double cent; money=everything; ten = money/10; five = money%10; five2 = five/5; one = five%5; cout << "\nYou have:\n"; cout << "Lm10: " << ten; cout << "\nLm5: " << five2; cout << "\nLm1: " << one; cout << "\nLm0.50: " << (everything - money)*2; } int main() { intro(); cout<<"\nPlease enter your full name: "; char name[20]; cin.getline(name,20,'\n'); cout<<"\n"<<name<<" Bank Account:"; cout<<"\n"; int n; while (n!=0) { cout<<"\n\nPlease choose: \n1)Withdraw money from your bank account\n2)Deposit money into your bank account\n3)Check your account balance\n4)Empty your account\nPress 0 to quit!"; cin>>n; switch (n) { case 1: cout<<"\nPlease choose the amount you would like to withdraw:"; cout<<"\n1)Lm5\n2)Lm10\n3)Lm20\n4)Lm50\n5)Lm100\n6)Other...\n"; cin>>b; if (b==1) { if (5>everything) { cout<<"\nThe transaction cannot be done. There isn't enought money in your account"; } else { everything = everything - 5; cout<<"\nThe transaction is complete! - You have successully withdrawn Lm5!"; } } else if (b==2) { if (10>everything) { cout<<"\nThe transaction cannot be done. There isn't enought money in your account"; } else { everything = everything - 10; cout<<"\nThe transaction is complete! - You have successully withdrawn Lm10!"; } } else if (b==3) { if (20>everything) { cout<<"\nThe transaction cannot be done. There isn't enought money in your account"; } else { everything = everything - 20; cout<<"\nThe transaction is complete! - You have successully withdrawn Lm20!"; } } else if (b==4) { if (50>everything) { cout<<"\nThe transaction cannot be done. There isn't enought money in your account"; } else { everything = everything - 50; cout<<"\nThe transaction is complete! - You have successully withdrawn Lm50!"; } } else if (b==5) { if (100>everything) { cout<<"\nThe transaction cannot be done. There isn't enought money in your account"; } else { everything = everything - 100; cout<<"\nThe transaction is complete! - You have successully withdrawn Lm100!"; } } else if (b==6) { cout<<"\nPlease enter the amount:"; float g; cin>>g; if (g>everything) { cout<<"\nThe transaction cannot be done. There isn't enought money in your account"; } else { everything = everything - g; cout<<"\nThe transaction is complete! - You have successully withdrawn Lm"<<g<<"!"; } } break; case 2: cout<<"\nPlease enter the amount you would like to put into your bank account."; cin>>a; everything = everything + a; cout<<"\nThe transaction is complete! - You have successully put Lm"<<a<<" into your bank account!"; cout<<"You now have Lm"<<everything<<". Check your account balance for more info."; break; case 3: cout<<"\nHere's your balance:"; balance(); balancenote(); break; case 4: everything = 0; cout<<"\nYour account has been emptied"; break; case 0: break; default: cout<<"\nYou have pressed the wrong number!"; } } char q; do { cout<<"\nThanks for using BANK ACCOUNT ORGANIZER! Press Q to quit!"; cin>>q; if (q=='q' || q=='Q') return 0; }while (q!='q' && q!='Q'); }