Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cout << "Enter the number of elements" << endl;
- cin >> n;
- int* A;
- A = new int[n];
- int sum = 0;
- int i = 0;
- cout << "Enter the elements" << endl;
- for (i = 0; i < n; i++) {
- cin >> A[i];
- }
- for (i = 0; i < n; i++) {
- if (A[i] == A[i + 1]) {
- cout << "There is two number " << A[i] << "'s in the array";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement