#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define e 2.71
double f(double num1) {
double num2;
num2=pow(e, -num1) - num1;
return num2;
} //definition of f(x)
int main() {
double a, b, c,n1,n2,n3;
for (;;) {
printf("\n\n a값 입력:");
scanf("%lf", &a);
printf("\n b값 입력:");
scanf("%lf", &b);
n1 = f(b)*(a - b);
printf("n1값:%lf\n",n1);
n2 = f(a) - f(b);
printf("n2값:%lf\n", n2);
n3 = n1 / n2;
printf("n3값:%lf\n", n3);
c = b - n3;
printf("\n c값은:%lf", c);
}
}