Input numeric variables

2008-02-28
2013-04-04
  • Manuel Santos
    Manuel Santos
    2008-02-28

    How can I input numeric variables?

     
    • Bob Kazooie
      Bob Kazooie
      2008-03-24

      Uh...

      As much as I understand from programming it would be symply adding the line

      x=y

      that results in variable x being y

      Example

      A=375
      Print A

      displays the numeric value of A. Nothing more is needed.

       
    • Try this program

      Addition:

      print "Addition"
      input "First number  :  ", z1$
      z1 = int(z1$)
      input "Second number :  ", z2$
      z2 = int(z2$)
      z3 = z1 + z2
      print"Your result:"
      print z1;: print " + ";: print z2;: print " = ";: input "", z4$
      z4 = int(z4$)
      if z3 = z4 then print "RIGHT"
      if z3 <> z4 then print "WRONG"

      input "New one ? (y) ", q1$
      if q1$ = y then goto Addition
      end

      But integer numbers only !

       
      • Manuel Santos
        Manuel Santos
        2008-10-12

        Thank you very much for your help

        MS

         
  • Sergey
    Sergey
    2009-11-11

    if q1$ = "y"  then goto Addition

     
  • Jim Reneau
    Jim Reneau
    2009-11-11

    The current version alows for input directly into a float variable

    INPUT a -or- INPUT "Prompt",a

    Hopefully this will remove the need to do

    INPUT foo$
    a = float(foo$)

    like previously required.

    Jim