#include <iostream>
using namespace std;
int main()
{
const int SIZE = 18;
int a[SIZE];
for (int i = 0; i < SIZE; i++)
{
a[i] = i % 3; // Use modulo to repeat the sequence 0, 1, 2
}
cout << "[";
if (SIZE > 0)
{
cout << a[0];
for (int i = 1; i < SIZE; i++)
{
cout << ", " << a[i];
}
}
cout << "]" << endl;
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: