Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setlocale(LC_ALL, "rus");
- int n = 0, k;
- int mas[256];
- do
- {
- k = 0;
- cin>> mas[n];
- int check = mas[n];
- for (int i = 0; i < 256; i++)
- {
- if (mas[i] == check)
- k++;
- }
- n++;
- }
- while (k <= 1);
- cout << "Колличество элементов, которые не повторяются =" <<n-1<< "n";
- int*ptrmas = mas;
- int* head = ptrmas;
- int*tail = ptrmas + n - 2;
- if (*head == *tail)
- {
- cout << "Очередь пуста." << "n";
- }
- else
- {
- if (*tail == 256)
- cout << "Очередь переполнена." << "n";}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement