-5

While using sqrt (n) with any variable n I am getting an error undefined reference to sqrt.

1 Answers1

-1

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

Jonathan Leffler
  • 698,132
  • 130
  • 858
  • 1,229