What a error in it ? it is giving correct input or output as per requirement but not submitting my answer

using namespace std;

int main() {
// your code goes here
int x;
float initialbal,remaining;
if(x%5==0 && x<2000 && x>0 && initialbal>=0.00 && initialbal<=2000.00)

// else cout<<“wrong”;
return 0;
https://www.codechef.com/problems/HS08TEST -problem

I may be mistaken, but i see no check to see
x +0.5 <initial balance., and else is commented?
The constraints are a given, you don’t need to check them in input.

1 Like