Little late, but I think this one works. Got it all on my own in about a half hour. Not commented cause I didn't get lost and probably would if I commented. It's pretty simple anyway
#include <iostream>
#include <cstdlib>
int n = 1;
int count = 1;
void prime(int x)
{
std::cout << x << "'s factors: ";
for (; n <= x/2; n++)
{
if (x%n==0)
{
std::cout << n << " ";
if (n > 1)
count++;
}
}
if (count >= 2)
std::cout << std::endl << x << " is not prime";
else
std::cout << std::endl << x << " is prime";
}
int main()
{
int x;
std::cout << "Enter number: ";
std::cin >> x;
prime(x);
std::cout << std::endl;
system("pause");
}