Advertisement
Guest User

Untitled

a guest
Sep 13th, 2019
539
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include <array>
  3. using namespace std;
  4.  
  5. int main() {
  6.  
  7.     array<int, 3> arr1 = { 0 };
  8.     array<int, 3> arr2 = { 0 };
  9.  
  10.     for (size_t i = 0; i < arr1.size(); i++)
  11.     {
  12.         cin >> arr1[i];
  13.     }
  14.  
  15.     cout << endl;
  16.  
  17.     for (size_t i = 0; i < arr2.size(); i++)
  18.     {
  19.         cin >> arr2[i];
  20.     }
  21.  
  22.     if (arr1.size() == arr2.size()) {
  23.         if (arr1 == arr2)
  24.         {
  25.             cout << "equal";
  26.         }
  27.         else cout << "not equal";
  28.     }
  29.     else cout << "not equal";
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement