CHALLENGE ACTIVITY 3.17.1: Conditional expression: Print negative or positive.
Create a conditional expression that evaluates to the string "negative" if userVal is less than 0, and "non-negative" otherwise.
Ex: If userVal is -9, the output is: "negative".
#include <iostream>
#include <string>
using namespace std;
int main() {
string condstr;
int userVal;
cin >> userVal;
condstr = (userVal < 0) ? "negative" : "non-negative";
cout << userVal << " is " << condstr << endl;
return 0;
}