Examples:
************************************** #include <iostream> void main() { int num; cout << "Enter the Number: "; cin >> num; if (num < 5) cout << "\nThe number is less than 5"; else cout << "\n Not less than 5"; cout << "\nDONE\n"; } ************************************** #include <iostream> void main() { int num; cout << "Enter the number: "; cin >> num; if (num < 5) { cout << "less than 5\n"; cout << "The number is:" << num; } else { cout << "Not less than 5\n"; cout << "Number is:" << num; } cout <<endl; } ************************************** #include void main() { int num; cout << "Enter the number"; cin >> num; if (num > 0) cout << "Number is positive:" << num; else cout << "Less than 0"; cout << endl; } ************************************** #include <iostream> void main() { int num; cout << "Enter the number: "; cin >> num; if (num == 0) cout << "\nNumber is ZERO"; else if(num > 0) cout << "\nThe number is positive"; else cout << "\n The number is negative"; cout << endl; }