Article 5MG9B C Program error : undefined reference to pow

C Program error : undefined reference to pow

by
williambrown615
from LinuxQuestions.org on (#5MG9B)
I typed a C program from the Internet that calculates Compound Interest.
One of the lines in the program reads CIFuture = PAmount*(pow((1+ROI/100), Time_Period));

When I run the program it gives the error: undefined reference to pow.

My gcc version is 7.31 20180712 (RED HAT 7.31-6.

I also included <stdio.h> and <math.h> in the program.

Why is pow undefined?latest?d=yIl2AUoC8zA latest?i=u16ZfOEIh9A:lf6EgvCysmw:F7zBnMy latest?i=u16ZfOEIh9A:lf6EgvCysmw:V_sGLiP latest?d=qj6IDK7rITs latest?i=u16ZfOEIh9A:lf6EgvCysmw:gIN9vFwu16ZfOEIh9A
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments