C++ doesn't know you mean multiplication when you put ( ) next to each other (as you normally would in math). You need to do c = (sqrt(a + b - (2)*(a*b)*(cos(angle))));
or else it thinks you are trying to call a function.