Guys...
I need a little help here:
I need to write a program in C++ that solves the equation 5sin(2x)=e^(x/2) for 0<=x<=2 and displays the roots on the screen.
Now: I'm using a for statement(i=0; i<=2;i++) with an if statement if(y==0) nested inside.
Problem is that the program displays only one root....but not the other! How can I make it displays both roots? Use two different for statements?
Thank you.
I need a little help here:
I need to write a program in C++ that solves the equation 5sin(2x)=e^(x/2) for 0<=x<=2 and displays the roots on the screen.
Now: I'm using a for statement(i=0; i<=2;i++) with an if statement if(y==0) nested inside.
Problem is that the program displays only one root....but not the other! How can I make it displays both roots? Use two different for statements?
Thank you.