Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 8:
- option = 'H';
- {
- int arr1[SIZE];
- int arr2[SIZE];
- bool identicalValues;
- cout << "Hello, please enter " <<SIZE<< " numbers --> ";
- for (int i=0 ; i < SIZE-1 ; i++)
- cin >> arr1[i];
- cout << "\n";
- cout << "Now, please enter more " <<SIZE<< " numbers --> ";
- for (int j=0 ; j < SIZE ; j++)
- cin >> arr2[j];
- cout << "\n";
- for(int i = 0, j=0; j < SIZE; i++, j++)
- {
- if (arr1[i] == arr2[j+1] && arr1[SIZE] == arr2[j])
- {
- identicalValues = true;
- }
- else
- {
- identicalValues = false;
- }
- if (identicalValues == false)
- {
- break;
- }
- }
- if (identicalValues == true)
- {
- cout << "True";
- cout << "\n";
- }
- else
- {
- cout << "False";
- cout << "\n";
- }
- system("pause");
- system("CLS");
- }
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement