With F defined as F then yes your code will be work. However you are learning/using bad habits. Arrays in C/C++ start at 0 and end at size - 1, trying for force starting at 1 is a bad practice. For one thing you are using more memory than you require. In this case if F is an integer you would be wasting 1000*3*sizeof(int) bytes, and if sizeof(int) is 4 that would be 12,000 bytes.
I fully understand that.
But to make the program more user-friendly I decided to keep it this way, at least for now.
How does an implementation detail such as array indexing at all affect the user? Jim is absolutely right, you are doing it wrong!
Look, I thank you for all your advice.
I know I am not yet a master-coder.
I am still a beginner at this.
Please, understand, I know what you mean, and I understand why I should change things.
But believe me, I have my reasons to keep it this way.
For those who are interested.
I have made a few changes in the program and it now works properly.
It gives the answer I seek in a fraction of a second.
Thanks you all, this topic is solved.
Can anyone tell me where I can show that this is solved?