ATM showing wrong answer in C++

using namespace std;
int main() {
int X;
double Y;
cout<<X<<" "<<fixed<<setprecision(2)<<Y<<endl;
if(0<X<=2000 && 0<=Y<2000 && X<=Y+0.50 && X%5==0) {

	return 0;

Where are you taking the input??? Take input for x and y also The conditions you are checking (constraints checking is not required) and Y>=x+0.5 should be the condtion . :slight_smile:

Happy coding

1 Like