For values 1 to 20, I'm getting output: 20 1 So what's the error?