 |
|
|
|
 |
drizzt81
Professional Lamer

Registered: Nov 2001
Location: GTA #1 - At work
|
|
|
| quote: | Originally posted by Trancealot
I supposed so... |
well, while this sounds liks a cool problem, i don't have the time to write a proggy that does this stuff right now. Let me give you some pointers (har har, get the pun!!):
start out simple. Write the functions, which are going to handle your I/O first. See that you get the information correctly from the user.
Next see if you have write a function, let's call it
code: int displayLine(int iTry, int iRoot, int iError)
which takes three ints and returns 0 if it executed sucessful. this function, uses the three integers provided to create one line of the array, which u are supposed to print.
If you are not getting many point for how teh array looks, u might just want to do a cout on this stuff and dump it to the screen before worrying about formatting.
one good thing is that there is a cout command, which let's u set the number of decimal places, which are displayed.
After you got your I/O sorted, it is time to crank out some Math book and figure out how the newton method is done. I don't know this off-hand (I remeber newton-raphson method for finding the zero's of functions).
From the problem statement, i assume that it will be an interative algorithm. You can then write a function
code: int Newton(int iSeed, int& iRoot, int& iError)
which will do one iteration of your algorithm and put the new root into iRoot, the new error into iError and returns 0 if it is successful.
Now you should have everything u need to write a little main loop, which uses these function stubs to ask for input, compute the rows, till the error == 0 and prints out one row at a time.
I hope that this helps a bit
___________________

get font
I see your 4 Crushs and raise you 3 As The Rush Comes. - Yan from PvD's first summerstage event in '03
|
|
Oct-06-2002 15:32
|
|
|
 |
 |
whiskers
old skool

Registered: Sep 2001
Location: in your dreams
|
|
|
Oct-06-2002 20:26
|
|
|
 |
 |
ampburner
progressive trancEaddict

Registered: Oct 2000
Location: Holland
|
|
|
Oct-06-2002 21:55
|
|
|
 |
 |
whiskers
old skool

Registered: Sep 2001
Location: in your dreams
|
|
|
Oct-06-2002 23:39
|
|
|
 |
All times are GMT. The time now is 07:55.
Forum Rules:
You may not post new threads
You may not post replies
You may not edit your posts
|
HTML code is ON
vB code is ON
[IMG] code is ON
|
|
|
|
|
|
Contact Us - return to tranceaddict
Powered by: Trance Music & vBulletin Forums
Copyright ©2000-2026, Jelsoft Enterprises Ltd.
Privacy Statement / DMCA
|