Ladies and Gentlemen:
I am pretty certain what I am missing is simple. Would you be so kind as to check my code and give me a hint as to what I might be missing? I have attempted to anticipate every contingency but I still fail at the submission.
Thank you for your time and assistance!
#include <stdio.h>
int main()
{
int input;
double balance;
double charge = .50;
scanf("%d", &input);
scanf("%lf", &balance);
if (input % 5 != 0 && input > 0 && input < 2001 && balance - ((double)input + charge) < 0)
{
printf( "%.2f\n", balance);
}
else if (input < balance && input > 0 && input < 2001 && balance > -1 && balance < 2001 && balance - ((double)input + charge) >= 0)
{
balance = (balance - (double)input) - charge;
printf( "%.2f\n", balance);
}
else
{
printf( "%.2f\n", balance);
}
return 0;
}