Back To C++ Flow of Control Index
//program to demonstrate if-else statement example 1 , check whether number is equal to 10 or not #include
#include
void main() { int a; cout<<"enter value for a"; cin>>a; clrscr(); if(a==10) { cout<<"a is equal to 10"; } else { cout<<"a is not equal to 10"; } getch(); }