Click here to Skip to main content
16,011,374 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalquery in rs232 programming in turbo c Pin
narasimhavarmap18-Nov-04 21:39
narasimhavarmap18-Nov-04 21:39 
GeneralRe: query in rs232 programming in turbo c Pin
Roger CS18-Nov-04 22:31
Roger CS18-Nov-04 22:31 
GeneralRe: query in rs232 programming in turbo c Pin
Anonymous19-Nov-04 18:39
Anonymous19-Nov-04 18:39 
GeneralRe: query in rs232 programming in turbo c Pin
Roger CS25-Nov-04 6:49
Roger CS25-Nov-04 6:49 
GeneralLine Caps Pin
S.DARWIN PAUL RAJ18-Nov-04 20:39
S.DARWIN PAUL RAJ18-Nov-04 20:39 
GeneralRe: Line End Style Pin
S.DARWIN PAUL RAJ20-Nov-04 21:00
S.DARWIN PAUL RAJ20-Nov-04 21:00 
GeneralRe: Line Caps Pin
P. Gnana Prakash21-Nov-04 1:14
P. Gnana Prakash21-Nov-04 1:14 
GeneralBisection Method Root Finding...little details Pin
shorty02br18-Nov-04 19:46
shorty02br18-Nov-04 19:46 
FYI I've ONLY written 6 programs in my WHOLE life

So this is what is going on.
function is ln(x^2)=.07
Lower x is .5, Upper x is 1
Gotta find the root...here is the program


#include <iostream>
#include <iomanip>
#include <cmath>

void bisection (double, double, double);
double f(double);

int main()
{
double xl=0.;
double xu=0.;
double xr=0.;

cout<<"Enter a lower number and an upper number:"<<endl;
cin>>xl>>xu;




bisection (xl, xu, xr);

return 0;
}

void bisection (double xl, double xu, double xr)
{
int i=0;
double func1=0.;
double func2=0.;
double func3=0.;

func1= f(xl);
func2= f(xu);
xr=(xl+xu)/2.;

if (func1*func2>0.)
{
cout << "Warning: No root exist"<< endl;
}
else
{
for (i=1; i<7; i++)
{
func3= f(xu);
}
if (func1*func3<0.)
{
cout<<"root lies in lower subinterval"<
GeneralRe: Bisection Method Root Finding...little details Pin
Joaquín M López Muñoz18-Nov-04 20:29
Joaquín M López Muñoz18-Nov-04 20:29 
GeneralRe: Bisection Method Root Finding...little details Pin
shorty02br19-Nov-04 6:02
shorty02br19-Nov-04 6:02 
GeneralRegister of ActiveX controls in common Location Pin
voonnalk18-Nov-04 18:25
voonnalk18-Nov-04 18:25 
GeneralRe: Register of ActiveX controls in common Location Pin
bryce18-Nov-04 18:41
bryce18-Nov-04 18:41 
GeneralIStorage::CreateStorage() help... Pin
RYU^^18-Nov-04 18:02
RYU^^18-Nov-04 18:02 
QuestionHow we can monitor wether the system time is changed manualy? Pin
Ranjish18-Nov-04 17:24
Ranjish18-Nov-04 17:24 
AnswerRe: How we can monitor wether the system time is changed manualy? Pin
22491718-Nov-04 18:30
22491718-Nov-04 18:30 
GeneralRe: How we can monitor wether the system time is changed manualy? Pin
Ranjish18-Nov-04 19:13
Ranjish18-Nov-04 19:13 
GeneralRe: How we can monitor wether the system time is changed manualy? Pin
22491718-Nov-04 19:40
22491718-Nov-04 19:40 
AnswerRe: How we can monitor wether the system time is changed manualy? Pin
Neville Franks18-Nov-04 23:40
Neville Franks18-Nov-04 23:40 
GeneralVisual Studio question Pin
glowskull0318-Nov-04 17:23
glowskull0318-Nov-04 17:23 
GeneralRe: Visual Studio question Pin
bryce18-Nov-04 18:38
bryce18-Nov-04 18:38 
GeneralRe: Visual Studio question Pin
David Crow19-Nov-04 4:12
David Crow19-Nov-04 4:12 
GeneralSocket communication problem between Windows 2003 and Windows 2000 Pin
fpdeguzman18-Nov-04 17:21
fpdeguzman18-Nov-04 17:21 
GeneralRe: Socket communication problem between Windows 2003 and Windows 2000 Pin
bryce18-Nov-04 18:43
bryce18-Nov-04 18:43 
GeneralAdding contols to tree view -,please help!!! Pin
ledallam18-Nov-04 17:08
ledallam18-Nov-04 17:08 
GeneralC memory map question. Pin
Link260018-Nov-04 16:40
Link260018-Nov-04 16:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.