get()

new topic     » topic index » view thread      » older message » newer message

------=_NextPart_000_0005_01C00AF9.E0D67760
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

include get.e

object input=20
atom value1, value2, value3, average, error_code          --why so =
complex example??????
sequence name

error_code =3D 999             --does it have to be an error code? What =
is 999?
    =20
puts(1,"Hello! Enter your first name in quotes below, like \"John\":\n")

while error_code !=3D 0 do
     input =3D get(0)
     error_code =3D input[1]        --What is this??? What is [1]
end while

name =3D input[2]        --What is this?? what is [2]

puts(1, "\nThank you! Now please enter any three numeric values =
below,\n")
puts(1, "and you will see both your name and the average of the =
three\n")
puts(1, "numbers you entered. Separate the numbers with the space =
bar:\n")

error_code =3D 999             --Same confusion with this!!! HELP!!
while error_code !=3D 0 do
     input =3D get(0)
     error_code =3D input[1]
end while
puts(1, "\nGot first number!\n")
value1 =3D input[2]=20

error_code =3D 999=20
while error_code !=3D 0 do
     input =3D get(0)
     error_code =3D input[1]
end while
puts(1, "\nGot second number!\n")
value2 =3D input[2]=20

error_code =3D 999=20
while error_code !=3D 0 do
     input =3D get(0)
     error_code =3D input[1]
end while
puts(1, "\nGot third number!\n")
value3 =3D input[2]=20

average =3D (value1+value2+value3)/3
printf(1,"\nHello, %s, your computed average is %4.2f\n",{name, =
average})


------=_NextPart_000_0005_01C00AF9.E0D67760
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>include get.e</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>object input <BR>atom value1, value2, =
value3,=20
average,=20
hy so=20
complex example??????<BR>sequence name</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>error_code =3D 999 &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; --does it have to&nbsp;be an error =

code?&nbsp;What is 999?<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR>puts(1,"Hello! =
Enter=20
your first name in quotes below, like \"John\":\n")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>while error_code !=3D 0=20
do<BR>&nbsp;&nbsp;&nbsp;&nbsp; input =3D =
get(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
error_code =3D input[1]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; --What is =
this???=20
What is [1]<BR>end while</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>name =3D input[2]&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; --What is this?? what is [2]</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>puts(1, "\nThank you! Now please enter =
any three=20
numeric values below,\n")<BR>puts(1, "and you will see both your name =
and the=20
average of the three\n")<BR>puts(1, "numbers you entered. Separate the =
numbers=20
with the space bar:\n")</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>error_code =3D 999 &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; --Same confusion with this!!!=20
HELP!!<BR>while error_code !=3D 0 do<BR>&nbsp;&nbsp;&nbsp;&nbsp; input =
=3D=20
get(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp; error_code =3D input[1]<BR>end =
while<BR>puts(1,=20
"\nGot first number!\n")<BR>value1 =3D input[2] </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>error_code =3D 999 <BR>while error_code =
!=3D 0=20
do<BR>&nbsp;&nbsp;&nbsp;&nbsp; input =3D =
get(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
error_code =3D input[1]<BR>end while<BR>puts(1, "\nGot second=20
number!\n")<BR>value2 =3D input[2] </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>error_code =3D 999 <BR>while error_code =
!=3D 0=20
do<BR>&nbsp;&nbsp;&nbsp;&nbsp; input =3D =
get(0)<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
error_code =3D input[1]<BR>end while<BR>puts(1, "\nGot third =
number!\n")<BR>value3=20
=3D input[2] </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>average =3D=20
(value1+value2+value3)/3<BR>printf(1,"\nHello, %s, your computed average =
is=20

------=_NextPart_000_0005_01C00AF9.E0D67760--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu