Read an integer N.
This number indicates how many values the array will have.
Then, read N integers (one per line) and store them in an array.
Check if at least one number in the array is negative (less than zero).
Hints:
for loop to read the data and store it in the array.bool variable that starts as false and becomes true if any number is negative.break to stop early once you find a negative number.An integer N, followed by N integers, one per line.
If there is at least one negative number, display Hay negativos. Otherwise, display Ninguno negativo.
Input:
4
5
3
8
1
Output:
Ninguno negativo
Input:
4
5
-3
8
1
Output:
Hay negativos