Answer:
Following are the program in the C++ Programming Language.
//define function
void printAttitude(int input)
{
//set the switch statement
switch(input)
{
//check the condition that argument is 1
case 1:
//print message then, break the statement
cout<<"disagree";
break;
//check the condition that the argument contain 2
case 2:
//print message then, break the statement
cout<<"no opinion";
break;
//check the condition that the argument contain 3
case 3:
//print message then, break the statement
cout<<"agree";
break;
}
}
Explanation:
Following are the description of the program: