โ Back to Arrays
Question 418
Count Negative Numbers
Count Negative Numbers
The program reads an integern, then readsnintegers into an array. Count how many of them are negative (less than0) and print that single count. For the input7followed by4 -2 7 -8 -1 3 0, print: 3 Print only the number followed by a newline.
Expected Output:
3
Topics:
Arrays
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.