You have to declare the variables of 'int' type instead of double and your error will get resolved.
Write below line. int x,y;
2.1m questions
2.1m answers
60 comments
57.0k users