Code unnecessarily provides a pow()
prototype, which is inconsistent with the one in math.h
.
#include <math.h>
// math.h provides: double pow(double x, double y);
Eliminate int pow(int x, int y);
.
Change code
// totalvalue = (valueA+valueB)*pow(10, valueC);
totalvalue = (valueA+valueB)* ((int)pow(10, valueC));
Or
double total;
total = (valueA+valueB)*pow(10, valueC);
printf("The total value is %.0lf", total );
Be sure to link in the math library to avoid 'undefined reference to pow'.
"undefined reference to `pow'" even with math.h and the library link -lm