Forum: C Aug 18th, 2004 |
| Replies: 23 Views: 25,252 Well, that isn't really that hard to do... :)
Here's some VB code to do it:
Dim loopvar as integer
For loopvar = 0 to 255
Debug.print loopvar & ": " & Chr(loopvar)
Next loopvar |
Forum: C Jun 26th, 2004 |
| Replies: 12 Views: 15,803 You know, I just remembered that I did this two years ago in QBASIC. Here's my code:
100 Cls
200 INPUT "WHAT NUMBER DO YOU WANT TO CHECK FOR PRIMENESS? ", NUMCHECK#
300 GoTo 500
400 Print... |
Forum: C Jun 24th, 2004 |
| Replies: 12 Views: 15,803 Nice code. :)
However, on low-memory systems, this smells like a stack crash (very recursive).
BTW, even if you are just checking for divisibility (ie. num1 % num2 == 0) to determine if a... |
Forum: C Jun 21st, 2004 |
| Replies: 12 Views: 15,803 Actually, you only have to go up to the square root of the number. If the number is a square, you'll get it, and if it isn't, you'll get one factor of each possible set, which is enough. |