I have submitted by code 3 times but codechef still says my answer is wrong, I have tested it multiple times and I cannot seem to find whats wrong, if someone could point this out it would really help me:
const double fee = 0.50;
double balance = 0;
int withdraw_amount = 0;
int main()
{
cin >> withdraw_amount >> balance;
if (withdraw_amount % 5 != 0)
{
cout << balance << endl;
}
else if (withdraw_amount > balance)
{
cout << balance << endl;
}
else
{
balance -= withdraw_amount + fee;
cout << setprecision(2) << fixed << balance << endl;
}
return 0;
}