#include<bits/stdc++.h>
using namespace std;
class Customer
	{
		string name;
		int balance,account_number;
		
		public:
			Customer(string name,int balance,int account_number)
			{
				this->name=name;
				this->balance=balance;
				this->account_number=account_number;
			}
			
			void deposit(int amount)
			{
				if(amount>0)
				{
					balance=balance+amount;
					cout<<amount<<" rs is credited successfully\n";
				}
				else
				{
					throw runtime_error("Enter valid amount");
				}
			}
			
			void withdraw (int amount)
			{
				if(amount>0 && amount<=balance)
				{
					balance=balance-amount;
					cout<<amount<<" rs is debited successfully\n";
				}
				else if(amount>balance)
				{
					throw runtime_error("Your balance is low");
				}
				
				else
				{
					throw ("Enter valid amount");
				}
			}
			
		
	};
	
	
	int main()
	{
		try
		{
			Customer C1("Rohit",5000,10);
			C1.withdraw(6000);
		}
		catch(const runtime_error &e)
		{
			cout<<"Exception occured: "<<e.what()<<endl;
		}
	
	}
	