Why am I getting an error while using sqrt function in c with a variable? [duplicate]

You should use #include <math.h>.
If you are using C++ use #include <cmath>.

Leave a Comment