I have submitted by code so many times but codechef still says my answer is wrong, I cannot seem to find whats wrong, if someone could point this out it would really help me.
#include
#include
using namespace std;
int main()
{
int amount_withdrawn;
float total_amount;
cin >> amount_withdrawn >> total_amount;
if(amount_withdrawn > 0 && amount_withdrawn <= 2000 && total_amount >= 0 && total_amount <= 2000)
{
if(amount_withdrawn % 5 == 0 && (amount_withdrawn + 0.05) <= total_amount)
{
cout << total_amount - amount_withdrawn - 0.05;
}
else
cout << fixed<<setprecision(2)<< total_amount;
}
return 0;
}