so I was wondering if there was a way to have an equation in C++, and use that equation to make an array that has the results of the equation. For example, an equation like n^(2)-1 would create an array of [1,3,7,12,31].
I am a beginner in C++, so I have no clue where I would start in doing this.
I can provide more details if needed, thank you in advance!