Search Results

Showing results 1 to 4 of 4
Search took 0.00 seconds.
Search: Posts Made By: Toba ; Forum: C and child forums
Forum: C Aug 18th, 2004
Replies: 23
Views: 25,252
Posted By Toba
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
Posted By Toba
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
Posted By Toba
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
Posted By Toba
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.
Showing results 1 to 4 of 4

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC