I'm trying to generate 100 random numbers from 1-100 into an array. I can generate the 100 random numbers but don't know how to put it into an array.
#include<iostream>
using namespace std;
int main()
{
int ar;
for(int i=0; i<100; i++)
{
ar =(rand()%100);
cout<<ar<<" ";
}
}