SHARE
TWEET

Untitled

a guest Dec 14th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  int main ()
  4. {
  5.    int x [10], y[10];
  6.    int counterr=0;
  7.    cout << "Enter the first 10 numbers: " <<endl;
  8.    for (int k=0; k<=9; k++)
  9.    {
  10.        cin>> x[k];
  11.    }
  12.    cout << "Enter the second 10 numbers: " <<endl;
  13.    for (int counterr=0; counterr<=9; counterr ++)
  14.    {
  15.        cin >> y[counterr];
  16.    }
  17.    for (int i=0; i<=9; i++)
  18.    {
  19.        for (int o=0; o<=9; o++)
  20.        {
  21.            if( x[k] == y[counterr] )
  22.            {
  23.                o++;
  24.                cout << x[k] << "its index is: " << k << endl;
  25.                cout << y[counterr] <<"its index is: " <<counterr <<endl;
  26.            }
  27.  
  28.        }
  29.    }
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top