I am fairly new to C programming and am running into a little issue.
I am inputting 0.05 as a double float and am running it through the formula given in my solution picture to acquire the answer 0.06242. However, I keep getting 0.000000 no matter what I type as my input. Can someone explain to me if there is something wrong with my code or maybe explain if I am using "%lf" correctly in both scanf and printf? Thanks.
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
main(){
double guess, pow1,pow2,pow3, estimate;
printf("Type in an initial guess of the root(for this case type 0.05): ");
scanf("%lf", &guess);
printf("Calculating the root estimate using formula from solution...\n");
pow1 = pow(guess, 3);
pow2 = 0.165*pow(guess, 2);
pow3 = 3*pow(guess, 2);
estimate = guess - ((pow1 - pow2 + 0.0003993) / (pow3 - 0.33*guess));
printf("Estimate = %lf\n", estimate);
}