Okay so first of all I'm a beginner. This code took me like 3 days. My professor only allows me to use basic functions like if-else, loops(do-while, while and for). This code works perfectly but when I input some odd composite integers like 171, it will tell me that that it is a composite number three times. *Number is composite. Number is composite. Number is composite* I already put break; so it will stop the infinite message. Some odd composite integer works fine like 169, 9 and 25. Note that I had to use getchar() twice because for some reason, DevC++ would quit the program immediately if I use only one. Thanks for any kind of help.