This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Lua.is.the.best's profile picture

Find Estimated Numbers with (n.n) Numbers

Started by Lua.is.the.best, 20 March 2014 - 07:45 PM
Lua.is.the.best #1
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 on 20 March 2014 - 07:46 PM
CometWolf #2
Posted 20 March 2014 - 08:59 PM
I don't… what? How is this non-sense error code a tutorial?
Lyqyd #3
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.