So I am trying to make a basic program, I want to make a vector called numbers, and fill it with 10 random numbers between one and a hundred. This is what I have so far;
#include <iostream>
#include <vector>
using namespace std;
int main()
{
   vector<int> numbers;
   int in = rand() % 100 + 1;
   for (int i = 0; i < in; i++)
   {
      int n = rand() % 100 + 1;
      numbers.push_back(n);
      cout << "Number is: " << numbers[i];
      system("pause");
      return 0;
   }
}
It only outputs one number and I am looking to output ten random ones.
 
     
     
     
     
     
     
    