cout<<"Enter a number in the range of 1 - 10 ";
cin>>num;
// check if the input is valid
if(num<0 || num > 10)
cout<<"Invalid Number"
// checking for appropriate output
switch(num)
7.2m questions
9.6m answers