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

SimpleCalculator V1

Started by Spongy141, 12 April 2013 - 03:21 PM
Spongy141 #1
Posted 12 April 2013 - 05:21 PM
SimpleCalculator
Well I got bored today, so I made a simple calculator, so far it divides, multiplies, adds, subtract, gets the power of a number.
If you actually use the calculator, the variable "x" is for your first number, and "n" is for your second number. Then it will print the answer but wont say anything like "Answer is: " it simply prints the answer.

Links

pastebin get TLGbsJZL <name>
OR
Link

TODO List
Spoiler
  • Add the ability for it to solve an entire proportion, and other equations
  • Color support
  • Better GUI


Hope you like enjoy my calculator!
Spongy141 #2
Posted 12 April 2013 - 06:26 PM
Added a Screenshot.
EDIT: When multiplying with decimals the answer seems to be simplified… I'll try to have it not do that, (Even though I don't know why it even does that)
Jappards #3
Posted 13 April 2013 - 06:17 AM
nice, how does your calculator program handle undivined calculations?
undividened calculations are calculations like devinding by 0.
Spongy141 #4
Posted 13 April 2013 - 12:02 PM
nice, how does your calculator program handle undivined calculations?
undividened calculations are calculations like devinding by 0.
Well after you type in what type of math you want to use, "+,*,-,^,/" each has its own if function, from there if its dividing, all it does even if it is 0 is divide the number with 0, so either way the answer should be zero.

Also I'm working on having it compare two numbers. then I will make it fully controlled by buttons.
NotAmaster #5
Posted 14 April 2013 - 04:33 PM
Nice
Spongy141 #6
Posted 14 April 2013 - 05:15 PM
Nice
Thanks