Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

switch (C){ case 1: cout<<\"your choice was xSinX\"<<endl; return int xSinX(doub

ID: 3609803 • Letter: S

Question

switch (C){
case 1: cout<<"your choice was xSinX"<<endl;
return int xSinX(double result[],int nValues,double X0,doubledeltaX);
break;
default: cout<<"This is not a choice"<<endl;
return 0;
break;
}


error messege that i get:

expected primary-expression before "int"
expected `;' before "int"

what im trying to do is that im making a menu and once the userinputs the number that he wants depending o the case it will returnthe function and solve it.

how do i do that? can you show a example?

Explanation / Answer

please rate - thanks your doing it right, you are trying to cast the value, and left outthe () see blue switch (C){ case 1: cout