Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. C++
  2. Two arrays list1 and list2 are identical if they have the same contents. Write a function that returns
  3. true if list1 and list2 are identical using the following header:
  4.  
  5. bool isEqual(const int list1[], const int list2[], int size)
  6.  
  7. Write a test program that prompts the user to enter two lists of integers and displays whether the two
  8. are identical. Note that the first number in the input indicates the number of the elements in the list.
  9. This number is not part of the list. Assume the list size is maximum 20.
  10.  
  11. Sample Input:
  12. 5 2 5 6 6 1
  13. 5 5 2 6 1 6
  14.  
  15. Sample Output:
  16. Enter list1: 5 2 5 6 6 1
  17. Enter list2: 5 5 2 6 1 6
  18. Two lists are identical
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement