#includeusing namespace std; int main() { int num; cout << "Enter a number: "; cin >> num; if (num > 0) { cout << "The number is positive"; } else if (num < 0) { cout << "The number is negative"; } else { cout << "The number is zero"; } return 0; }
#includeThis code also uses the iostream library for input/output operations. Overall, the selection statements and operators in C++ are part of the core language and are not included in any specific package or library. However, different libraries may have their own implementation of selection techniques for specific use cases.using namespace std; int main() { int num1, num2, max; cout << "Enter two numbers: "; cin >> num1 >> num2; max = (num1 > num2) ? num1 : num2; cout << "The maximum of the two numbers is: " << max; return 0; }