Anonymous user
Calculating the value of e: Difference between revisions
m
no edit summary
imported>Lacika7 mNo edit summary |
|||
Line 456:
{{out}}
<pre>The value of E = 2.718282</pre>
==={{header|IS-BASIC}}===▼
<syntaxhighlight lang="is-basic">100 PROGRAM "e.bas"▼
110 LET E1=0:LET E,N,N1=1▼
120 DO WHILE E<>E1▼
130 LET E1=E:LET E=E+1/N▼
140 LET N1=N1+1:LET N=N*N1▼
150 LOOP ▼
160 PRINT "The value of e =";E</syntaxhighlight>▼
{{Out}}▼
<pre>The value of e = 2.71828183</pre>▼
==={{header|GW-BASIC}}===
Line 2,248 ⟶ 2,259:
computed e 2.718281828459046
keyword &e 2.718281828459045</pre>
▲=={{header|IS-BASIC}}==
▲<syntaxhighlight lang="is-basic">100 PROGRAM "e.bas"
▲110 LET E1=0:LET E,N,N1=1
▲120 DO WHILE E<>E1
▲130 LET E1=E:LET E=E+1/N
▲140 LET N1=N1+1:LET N=N*N1
▲150 LOOP
▲160 PRINT "The value of e =";E</syntaxhighlight>
▲{{Out}}
▲<pre>The value of e = 2.71828183</pre>
=={{header|J}}==
Perhaps too brief:
|