#include<iostream>
using namespace std;
int main()
{
int openaccount,option;
float balance=200.00,amount;
cout<<"\t\t\t\t\t##########################"<<endl;
cout<<"\t\t\t\t\tWELCOME TO MY ATM MACHINE:"<<endl;
cout<<"\t\t\t\t\t##########################"<<endl;
cout<<"please press 1 to open your account:"<<endl;
cin>>openaccount;
if(openaccount==1)
{
cout<<"****************************************"<<endl;
cout<<"press 1 for withdraw your amount:"<<endl;
cout<<"press 2 for checking your balance:"<<endl;
cout<<"****************************************"<<endl;
cout<<"please select an option between(1 or 2):"<<endl;
cin>>option;
if(option==1)
{
cout<<"please enter you amount that you want to withdraw:"<<endl;
cin>>amount;
if(amount<15)
{
cout<<"sorry amount should be greater than 15 rupees:"<<endl;
}
else if(amount>balance)
{
cout<<"sorry your balance less then"<<" "<<amount<<" "<<"so you cannot be withdraw this amount"<<endl;
}
else
{
cout<<"congratulation you have successfully withdraw"<<" "<<amount<<" "<<"rupees"<<endl;
balance=balance-amount;
cout<<"your new balance after withdraw"<<" "<<amount<<" "<<"rupees"<<" is"<<" "<<balance<<endl;
}
}
else if(option==2)
{
cout<<"your balance in your account is"<<" "<<balance<<endl;
}
else
{
cout<<"this option is not exit int this list"<<endl;
cout<<"please enter option once again"<<endl;
cin>>option;
}
}
cout<<"\t\t\tthank you dear customer for using our atm mechine:"<<endl;
}
No comments:
Post a Comment