currently wrote a bank account type code it compiles well but instead of givign a starting bank account of 40 when i run it it gives a starting bank account of 22 + the deposit. I also tryed usign a const for the starting bank account so i just did bank == 40. take a look at the code
think im starting to get the hang of this another week or two practicing code n ill move up :)
Code:#include <iostream>
using namespace std;
int main ()
{
int i;
int bank;
bank == 40;
cout<<"You have 40 dollars in your account" << endl;
cout << "Enter how much money you want to deposit: ";
cin >> i;
cin.ignore();
cout << "You have " << bank + i <<" in your account "<< endl;
cout << " and an interest rate of " << (bank + i) * .05 <<" per month "<< endl;
cin.get();
}