A program that calculates a certain f(x)

0 Sig Rit · October 2, 2015
/images/forum/upload/2015-10-01/8113cd2255035d1e6f1dc1c7591651a4.jpg
How do I write a program that calculates the value of y?

Post a Reply

Replies

Oldest  Newest  Rating
+1 Jon Z. · October 2, 2015

#include<math.h>

double f(double x){
return ( (1/x) * log( sqrt( exp(x-1) ) ) );
}
0 Jon Z. · October 2, 2015
btw here is the documentation for the math library.

http://www.cplusplus.com/reference/cmath/?kw=math.h
0 Sig Rit · October 2, 2015
Thank you SO much, I'm gonna give it a go, I'm so lost when it comes to programming :(..
0 Jon Z. · October 4, 2015
np. feel free to ask me if you have any questions.
  • 1

C

107,149 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator