Having problems with ATM problem (c++)

[ The code works perfectly in my pc but it doesn’t work in the Wesbite… ]

#include

using namespace std;

int main(){

//ATM (Codechef)
double tax = 0.50;
double balance = 0;
int to_withdraw = 0;


//Getting the information

cin >> to_withdraw >> balance;
//checking the balance 

//check if is under 2000

if(to_withdraw > 0 && to_withdraw <= 2000){

	//check balance 

	if(balance > 0 && balance <= 2000){

		if(balance > to_withdraw ){

	//if there is money in the account

	//check if it is multiple

	if(to_withdraw % 5 == 0){

		//if it is multiple of 5
		//make the transaction
		balance = balance - to_withdraw - tax;


		cout << balance;

	}else{

		//otherwise, print current balance
		cout << balance;
	}

}else{

	//if there is not enought money, cout the balance of the account
	cout << balance;
}

	}
}

}

The cash machine will only accept the transaction if X is a multiple of 5, and Pooja’s account balance has enough cash to perform the withdrawal transaction (including bank charges).

I think you did not read the problem statement carefully.

Replace

if(balance > to_withdraw )

with

if(balance >= to_withdraw + tax )
//