Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n = 0;
- cin >> n;
- int *arr = new int[n];
- for (int i = 0; i < n; ++i)
- {
- cin >> arr[i];
- }
- for (int i = 0; i < n; ++i)
- {
- int k = 0;
- for (int j = 0; j < n; ++j)
- {
- if (arr[i] == arr[j] && i != j)
- {
- ++k;
- continue;
- }
- }
- if (k == 0)
- {
- cout << arr[i];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement