Jump to content




Find Estimated Numbers with (n.n) Numbers


  • This topic is locked This topic is locked
2 replies to this topic

#1 Lua.is.the.best

  • Members
  • 76 posts

Posted 20 March 2014 - 08:45 PM

Normally, 3/2 would produce 1.5.
But what if you wanted 2 (estimate)?
First, the variables.
A (number 1), B (number 2) and C (estimated answer).
A=3
B=2
C=2
To print the answer and estimated answer, use this:
print ("Answer is" A/B"!")
print ("Estimated answer is" C"!")
Edit: Removed size tags from one of the code tags.

Edited by Lua.is.the.best, 20 March 2014 - 08:46 PM.


#2 CometWolf

  • Members
  • 1,283 posts

Posted 20 March 2014 - 08:59 PM

I don't... what? How is this non-sense error code a tutorial?

#3 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 20 March 2014 - 09:40 PM

This isn't really a tutorial. The code would throw an error and it doesn't demonstrate any useful concepts. Check out some of the other tutorials (especially ones from the Ask a Pro project) for an example of what a tutorial should be. Locked.





2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users