why this solution is not getting accepted

#include

using namespace std;

int main() { int x,y,result;
cout<<“Enter amount to be withdrawn”;
cin>>x; cout<<“Enter the account
balance”; cin>>y; if(x>y)
cout<<" balance in your account is
only:"<<y; else if(x%5!=0)
cout<<“enter the amount in multiple of 5, account balance :”<<y;
else {
result=y-x;
cout<<“balance left after transacton:”<<result; }
return 0; }

1 Like

Your solution is not getting accepted because it is not following the required input as well as the output format .

Since this seems your first question on code chef , don’t worry much about as it 's a minor mistake . Have a look at this solution http://www.codechef.com/viewsolution/4409400 for clearity with proper input , output as well as data type used .
By data type i mean that you were required to you use float and you were using int .

I Hope it helps :slight_smile: .

6 Likes

I want to help but don’t have time to look at such un-formatted code. First mark the code part as a code.