Write code that puts "less than -9\n" to output if the value of userNum is less than -9.
Ex: If userNum is -15, then output is:
less than -9
userNum: -15
#include <iostream>
using namespace std;
int main(){
int userNum;
cout<<"Enter userNum: ";
cin>>userNum;
if(userNum < -9){
cout<<"less than -9\n";
cout<<"UserNum: "<<userNum;
}
return 0;
}
Comments
Leave a comment