Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 02-24-2004, 09:15 PM   #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
bolsey84 is offline   Reply With Quote
Old 02-24-2004, 09:24 PM   #2
Member (3 bit)
 
Join Date: Jul 2003
Posts: 6
Send a message via AIM to saleem
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;
}
saleem is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:47 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2