Hey, here's the latest project I thought up - any suggested improvements?
For some reason cin.get() doesn't work so I fell back on system("PAUSE").Code:
int factors = 0;
std::cout<<"Type a number and I'll report its factors, if any: ";
for (y = 1; y <= x; y++)
remainder = x%y;
if (remainder == 0 && y != 1 && y != x)
if (factors == 0)
std::cout<<x<<" is a prime number."<<std::endl;
std::cout<<y<<" is a factor of "<<x<<std::endl;
FYI I got stuck partway through Accelerated C++ so now I'm reading The C++ Primer by Skinner and Standard C++ Bible by Stevens and Walnum. I still have more ideas than skill!
Thanks for your input -