these are my codes
please someone help me...
i don't know where to put pointer and i have to present my codes this week..
thanks..(^_^)
#include<iostream>
#include<string>
using namespace std;
void deposite();
void withdraw();
struct BANK
{
float in,balance,money1;
}bank;
int main()
{
float money,balance;
int password,choice;
char answer;
string name="";
cout<<"Assumed your money for example"<<endl;
cin>>bank.money1;
getline(cin,name);
money=bank.money1;
cout<<"Your money is RM "<<bank.money1<<endl<<endl<<endl;
cout<<"********************************\n\n"<<endl;
cout<<" Welcome to BankRupted\n\n\n";
cout<<"********************************"<<endl;
cout<<"\nPlease enter your password:"<<endl;
cin>>password;
getline(cin,name);
cout<<"Your password is valid!!\n";
do
{
cout<<"________________________________\n"<<endl;
cout<<" 1.Check your balance"<<endl;
cout<<" 2.Deposite"<<endl;
cout<<" 3.Withdraw"<<endl<<endl;
cout<<"________________________________\n"<<endl;
cout<<"Please enter your choice:\n";
cin>>choice;
break;
}
}
bank.money1=bank.balance;
cout<<"Do you want to continue(y=Yes/n=No)?"<<endl;
cin>>answer;
}while(answer=='y'||answer=='Y');
cout<<"________________________________"<<endl;
cout<<"Thank You for using our services"<<endl;
cout<<"Please come again"<<endl;
cout<<"********************************"<<endl;
return 0;
}
void deposite()
{
cout<<"You can only deposite note RM10, RM50 and RM100"<<endl;
long int x,f,t,e;
long int z;
cout<<"Enter the amount of money to be deposite: "<<endl;
cin>>z;
cout<<"Enter the amount of money to be withdraw:"<<endl;
cin>>bank.in;
if (bank.in<bank.money1)
{
cout<<"Your amount is :RM "<<bank.in<<endl;
bank.balance=bank.money1-bank.in;
cout<<"Your balance is :RM "<<bank.balance<<endl;
}
else
cout<<"not enough balance!!"<<endl;
}