djelad1

Untitled

Nov 14th, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. const int SIZE2 = 5;
  4. void main()
  5. {
  6.  
  7. cout << "answer question No.5\n\n";
  8.  
  9. int arr[SIZE2], arr2[SIZE2], i = 0;
  10. cout << "please enter " << SIZE2 << " numbers: ";
  11. for (i = 0; i < SIZE2; i++)
  12.  
  13. cin >> arr[i];
  14.  
  15. cout << "please enter " << SIZE2 << " numbers: ";
  16. for (int j = 0; j < SIZE2; j++)
  17. {
  18. cin >> arr2[j];
  19.  
  20. if (arr[i] == arr2[j])
  21. {
  22. cout << arr2[j] << endl;
  23. }
  24. }
  25.  
  26. system ("pause");
  27. }
Advertisement
Add Comment
Please, Sign In to add comment