Skip to content

Instantly share code, notes, and snippets.

@tabvn
Created May 24, 2019 15:22
Show Gist options
  • Save tabvn/31e1d4b04af86b8716891c9a3f50a3da to your computer and use it in GitHub Desktop.
Save tabvn/31e1d4b04af86b8716891c9a3f50a3da to your computer and use it in GitHub Desktop.
#include <iostream>
#include <time.h>
using namespace std;
int main()
{
const int LEN = 99;
int x;
int arr[LEN];
for (int i = 0; i < LEN; ++i)
{
x = (rand() % 2019 +1);
arr[i] = x;
}
cout << "Mang gom cac phan tu ngau nhien <= 2019:" << endl;
for (int i = 0; i < LEN; ++i)
{
cout << arr[i] << endl;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment