Replace pi222687


the code is skipping one of its iterations,
i dont know why??

@D18LP0080
Please use scn.next() instead of scn.nextline().

Using next() will only return what comes before a space. nextLine() automatically moves the scanner down after returning the current line .
if you have doubts further don’t hesitate to ask over here else mark it resolved.