Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Interesting Challenge
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00259328
Message ID:
00259607
Vues:
19
>Should have guessed you would be the first to reply... I am eagerly awaiting your post.

Here's some rudimentary code with index adjusted from 0 to 1, it really could be recursive:
local n,nwantroot,dime acount(20)
store .9 to acount && something to get into the loop

acount[1] = 1
n = 2
set deci to 15
nwantroot = 2
? 'Start number is: ',nwantroot

do while acount[n] != acount[n-1]
  acount[n+1] = (acount[n] + nwantroot/acount[n])/2
  n = n + 1
enddo

? "Number's Root is:",acount[n]
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform