C++ class

I'm am taking a c++ class as a beginner. I know its a simple program. . Create a vector called myVector, that will have 100 components of type double. Make sure you declare the starting vector to be 100 elements and each element starts at zero. Then with loops set the first 25 elements equal to the square of the index. The next 25 elements should be equal to the cube of the index. The third set of elements should be equal to the square root of the index. And the fourth set of elements should be equal to the double of the index (i + i). Then print out the elements with 10 elements on each line of the printout, make sure there are spaces between the elements. I'm late on it now.
Create a vector called myVector, that will have 100 components of type double.


Do that, then do the next bit, then the next.

The code you're looking for is here:
http://www.cplusplus.com/reference/vector/vector/vector/

Topic archived. No new replies allowed.