Back To C++ Flow of Control Index
//program to demonstrate if-else statement example 3 , check whether number is less than 10 or not #include
#include
using namespace std; int main() { int a; cout<<"enter value for a"; cin>>a; if(a<10) { cout<<"a is less than 10"; } else { cout<<"a is greater than or equal to 10"; } return 0; }