first off, this is my very first post, so sorry if i sound a little noobish. also, i've only been learning C++ since september, and we're going pretty slow.
so yesterday I got an assignment, using only for loops, and if statements, enter a number, find it's factors, and tell if it's prime or not prime.
my first thought was to figure out if it was prime or not, before getting to the factors, because it sounded simpler. i later found out that the way my teacher wants us to do it, is get the factors, and with those, you'll know if it's prime or not, as there will only be 2 factors (1 and X) if it is prime.
now, i spent maybe 2 hours trying out different things, and i don't have my files from school with me, so i cant post any code that i tried, but some help, at least a point in the right direction would be really appreciated.