    #include <iostream>
    #include <string>
    using namespace std;
    
    
    
    int main() 
    {
                int N;
        
                cout << "size array:" << endl;
                cin >> N;
                if (N > 1 && N < 256) {
                    
                    int* arr = new int[N];
    
                    bool alreadyThere;
                    cout << "output of numbers: ";
                    for (int j = 0; j < N;)
                    {
                        alreadyThere = false;
                        int newRandomValue = rand() % 256;
    
                        for (int i = 0; i < j; i++)
                        {
                            if (arr[i] == newRandomValue)
                            {
                                alreadyThere = true;
                                break;
                            }
                        }
    
                        if (!alreadyThere)
                        {
                            arr[j] = newRandomValue;
                            cout << " " << arr[j];
                            j++;
                        }
                        
                    }                                               
                } 
                else 
                {
                    cout << "wrong number entered" << endl;
                }
    
                return 0;
    
        
    }