0
What is error of my code?
2 Respuestas
+ 1
you need to include math.h to use sqrt
#include<math.h>
+ 1
As mentioned, you need to include math.h
#include <math.h>
at the top of your file. However the way you currently implement the square root case won't work, as the √ is outside the range the type char can handle. Another thing: It's bad practice to put the default case somewhere in the middle of your switch, always try to put it at the end unless you have a good reason not to.