Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Curious if I am thinking about this right.
#9
Half again (I probably should have tested this)
Code: (Select All)
Input "Enter a Number to convert "; num
Input "Enter 1 for conversion to mm from inches any other does vice versa "; op%
Print _IIf(op% = 1, num * 25.4, num / 25.4) ' 25.4 mm per inch

Are the Input questions not explanatory comment enough for the variables?

The beauty of Basic is that you don't have to Dim plain variables.

EDIT: a comment added to explain where the 25.4 number is coming from
b = b + ...
Reply


Messages In This Thread
RE: Curious if I am thinking about this right. - by bplus - 11 hours ago



Users browsing this thread: 16 Guest(s)