Write a program to read N integers into each of two arrays X and Y of size
20. The program will prompt the user to enter the values into each of the arrays. The
program will then compare each of the elements of X to the corresponding element in Y.
Then, in the corresponding element of a third array Z, store:-
- 1
-
if X is larger than Y
- 0
-
if X is equal to Y
- -1
-
if X is less than Y
Then print out a three column table displaying the contents of the arrays
X, Y and Z, followed by a count of the number of elements of X that exceed
Y, and a count of the number of elements of X that are less than Y. Make up
your own test data.
Declare your arrays to be of a size greater than you will require, (larger
than N).