Using SiMPLE to Help
Solve "Online Riddles"
Ever since Mr. Logic released his Cybertrek game back in 2002, "Online Riddles" have become quite popular. Sometimes those riddles (especially the riddles by Mr. Logic) may require you to solve numerical puzzles, like:
"What is the sum of all the prime numbers between 1 and 100?"Now, you could sit down with a pencil and paper and work out the answer. (Ugh!) Or you could use a calculator and punch in all the numbers (and hope that you don't make an error -- Ugh!) Or, if you know how to use SiMPLE, you could just write a very short program that lets the computer find the correct answer for you!
| SiMPLE Program |
When you run the program, you quickly find that the answer is: 1060.
(And doing it this way is not only faster, but it also takes a lot less
work than trying to solve the problem by hand!
)
As a second example, suppose you are required to solve the following kind of puzzle:
"The product of two whole numbers is 26441. If both of theOnce again, you could sit down with a pencil and paper and try to solve it. Or you could use a calculator and try guessing at the numbers. Or you could just write a very short SiMPLE program to find the answer:
numbers are greater than one, what are the two numbers?"
| SiMPLE Program |
When you run the program, you quickly find that the two numbers are: 137 and 193.
As a final example, suppose you are required to solve a somewhat more complicated kind of puzzle such as the following one:
Once again, you could sit down with a calculator and try guessing at the two numbers to see which ones work. (Good luck!!!) Or you could just write a SiMPLE program to find the answer:ABC × DEF = EDAFBC
In the above equation, A, B, C, D, E,
and F each represent a non-zero digit.
What numbers do ABC and DEF represent?
| SiMPLE Program |
When you run the program, you find that the two numbers are: 425 and 317.
In conclusion, you can see that SiMPLE can be used for doing a whole lot more stuff than
merely creating graphics images and blowing up rockets and UFOs!
SiMPLE is a powerful tool that can also help you with all of your "number crunching" needs.
[
Webmaster |
FAQ's |
Home Page |
Contact Us ]