Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- int x [10], y[10];
- int counter1;
- int counter2;
- cout << "Enter the first 10 numbers: " <<endl;
- for (int k=0; k<=9; k++)
- {
- cin>> x[k];
- } ;
- cout << "Enter the second 10 numbers: " <<endl;
- for (int i=0; i<=9; i ++)
- {
- cin >> y[i];
- }
- for (int i=0; i<=9; i++)
- {
- for (int j=0; j<=9;j++)
- {
- if( x[i] == y[j] )
- {
- j++;
- cout << x[i] << "its index is: " << i << endl;
- cout << y[j] <<"its index is: " <<j <<endl;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement