|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (6 bit)
Join Date: Oct 2002
Location: Ohio
Posts: 32
|
f(x) = ln(x) in C++
alright, anybody know how to declare and write the following function in C++?
f(x) = ln(x)-5+x Here is what I have tried double rootFunction (double x, int 5) { double root; root = ln(x)-5+x; return root; } Any Ideas???? thanks |
|
|
|
|
|
#2 |
|
Member (3 bit)
|
Why is 5 a variable? i dont think it should be, tho i may be wrong, i havent coded in years
double rootFunction (double x) { double root; root = ln(x) - 5 + x; return root; } |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|