this program is suppose to start at 0 and go through to the desired number, in this case 500. however it starts at 205 and then goes to 500. what gives???
source code.
#include <iostream>
using namespace std;
int main()
{
for (int num = 0; num < 501; num++)
{
cout << num << " plugged in is " << (num*num)-(79*num)+1601 << endl;
}
return 0;
}
it will start at 205, i dont get it whats wrong with it?
It could be that your console buffer is not large enough to be able to show you all the 500 new lines. If my guess is true then the program actually runs as it should (other users confirmed that it works fine for them). In order to see all of your program's output you need to ether reconfigure your console emulator (which is platform dependant i guess so it might be useful that you tell us what OS you are using) or redirect your program's output to a file on your hdd which you will be able to read after your program has finished executing(because files don't have a word limit as your console buffer has, do they?)