Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Math
Message
From
19/03/2004 22:18:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/03/2004 09:36:44
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Math
Miscellaneous
Thread ID:
00887884
Message ID:
00888142
Views:
15
David's counsel looks good (as always).

The FOR... will repeat the code up to 5 times. You can change this to a higher number.

Also, you can change FOR / ENDFOR to DO WHILE .T. / ENDDO. This will create an "endless loop", that is, it will repeat until the EXIT is executed due to some condition.

>Hello
>
>Kindly if you please help me for this problem .vfp code or program
>
>F(x)=(COS x -2x pwer3 -0.5) IN [0.1,1.1]
>AND (ERROR percentage=.0003)=m.k
>STEP 1 FOR i= 1 TO 5
>STEP 2 p=(a+b)/2
>STEP 3 IF F(b)*F(a) < 0 THEN
>b=p
>ELSE
>	a=p
>	? p
>	STEP 4 IF i<=5 THEN
>	IF {abcelute} (b-a) <= 0 THEN
>		? p
>		EXIT
>	ELSE
>		i=i+1
>		GO TO STEP 2
>	ELSE
>		? out MESSAGE
>END
>
>
>
>
>
>
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform