Ok, well that was me being stupid.
Anyway, I fixed it and it now works (yay me)
long input;
int numberoften, abs, nxt;
abs = 1;
nxt = 1;
cout << "Enter a number ";
cin >> input;
cout << endl;
if (input > 1000000000 || input < -1000000000)
{
cout << input/1000000000 << ",";
if (input < -1000000000)
{
abs = -1;
}
nxt++;
}
if (input > 1000000 || input < -1000000)
{
if (abs*((input/1000000)%1000) < 100 && nxt > 1)
{
cout << "0" << abs*((input/1000000)%1000) << ",";
nxt++;
}
else
{
cout << abs*((input/1000000)%1000) << ",";
nxt++;
}
if (input < -1000000)
{
abs = -1;
}
}
if (input > 1000 || input < -1000)
{
if (abs*((input/1000)%1000) < 100 && nxt > 1)
{
cout << "0" << abs*((input/1000)%1000)<<",";
nxt++;
}
else
{
cout << abs*((input/1000)%1000)<<",";
nxt++;
}
if (input < -1000)
{
abs = -1;
}
if (nxt > 1)
{
cout << "0" << abs*(input%1000);
}
else
{
cout << abs*(input%1000);
}
}
cout << endl;
Yea, its long and obnoxious.