Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int SIZE2 = 5;
- void main()
- {
- cout << "answer question No.5\n\n";
- int arr[SIZE2], arr2[SIZE2], i = 0;
- cout << "please enter " << SIZE2 << " numbers: ";
- for (i = 0; i < SIZE2; i++)
- cin >> arr[i];
- cout << "please enter " << SIZE2 << " numbers: ";
- for (int j = 0; j < SIZE2; j++)
- {
- cin >> arr2[j];
- if (arr[i] == arr2[j])
- {
- cout << arr2[j] << endl;
- }
- }
- system ("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment