/* a program that asks the user to enter 20 values, then prints out a count of how many of those values were negative */ #include using namespace std; int main() { int val; int counter = 0; cout << "Please input 20 integers\n"; for (int i = 0; i < 20; i++) { cout << "Enter value #" << i+1 << ": "; cin >> val; if (val < 0) counter++; } cout << "You entered " << counter << " negative numbers\n"; }