Write the definition of a function printAttitude , which has an int parameter and returns nothing. The function prints a message to standard output depending on the value of its parameter .
If the parameter equals 1, the function prints disagree .
If the parameter equals 2, the function prints no opinion .
If the parameter equals 3, the function prints agree .
In the case of other values , the function does nothing.
Each message is printed on a line by itself.
this is what i have so far:
void printAttitude(int){
if (int == 1){
cout << "disagree" << endl;
}
else-if (int == 2){
cout << "no opinion" << endl;
}
else-if (int == 3){
cout << "agree" << endl;
}
}
I don't think it's right, someone please help. thanks