The function/method getInputArray accepts an argument N representing the size of an integer array to be created.
The fimction/method getInputArray must create an integer array of size N. Then the function must accept N integers and store them in
the array. Finally, the function must return the integer array.
Your task is to implement the function getInputArray so that it passes all the test cases.
IMPORTANT: Do not write the main() function as it is already defined. The main function prints the largest element in the array returned
by the function getInputArray
Example Input/Output 1:
Input:
8
60 36 48 8 99 92 5 15
Output:
99
Example Input/Output 2:
Input:
5
197 763 615 851 300
Output:
851
Max Execution Time Limit: 50 millisecs
Answers
Answer:
Answer
Explanation:
The function/method getInputArray accepts an argument N representing the size of an integer array to be created.
The fimction/method getInputArray must create an integer array of size N. Then the function must accept N integers and store them in
the array. Finally, the function must return the integer array.
Your task is to implement the function getInputArray so that it passes all the test cases.
IMPORTANT: Do not write the main() function as it is already defined. The main function prints the largest element in the array returned
by the function getInputArray
Example Input/Output 1:
Input:
8
60 36 48 8 99 92 5 15
Output:
99
Example Input/Output 2:
Input:
5
197 763 615 851 300
Output:
851
Max Execution Time Limit: 50 millisecs