I think my logic is correct the problem i am facing is that i am unable to call my function key() in main class. In line no 29
code link : https://ide.codingblocks.com/s/104938
Having Problem in calling function
your approach and logic of the function were absolutely correct…there were a couple of changes which were required…first there are multiple test cases so take input in while loop…second from main function call the public function which takes 2 arguments k1 and k2(line 88)…also in this function you were passing k1=0 and k2=0, but you have to pass the range which is specified by the user…
you can refer to this code for changes:
I appreciate it. That was helpful.