Getting Time Limit Exceeded Please Help.

My Answer Is:-

using namespace std;

int main()

{

int x,y,p;

// x is the money to be withdrawn

//y is the initial bank account

cin>>x>>y;

while(x!=0)

{

if((x%5==0) && (x<y))

{

p=y-(x+0.50);//p is the final account balance

cout<<p<<endl;}

else

{cout<<y<<endl;}

cin>>x>>y;

}

}

Any Help Will Be Highly Helpful.

Please Do Help.