int a; cout <<"Enter one number"<<endl; cin>>a ; switch(a){ case(1): // means ==> if a=1 cout<<"Your number is 1"; break; case(2): cout<<"Your number is 2"; break; default: cout<<"Other cases"; }