Cpp - basic prime check

when I was running only not prime code. when the command is executed if I add a 4 or 5 digit no. not prime is printed several times .
why?