Hs08TEST: Getting Wrong Answer

BElow is the code i generated and it matches the test cases output with ease on my system.

However When i submit it here, I keep getting wrong answer. Any helpful insights ?

#include <iostream>
using namespace std ;

int main (void)
{

    float X,Y, Z; // amount to be withdrawn ,available balance and amount after transaction

    cin>> X>> Y;

    if ((((int)X % 5) !=0 ) || (X > 2000)) // wrong entry or insufficient funds

            cout<<Y<<endl;

    else
        if(X> Y)

        cout<<Y<<endl;

    else
        {
        Z=(Y-(X+0.5));
        cout<< Z;//display balance after transaction
        }
    return 0;

}

You are not following output format (second test case) and also condition to perform condition (first test case)…