Qbasicnews.com
October 18, 2018, 11:06:24 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: CLASS 3D  (Read 4558 times)
lrcvs
Member
*
Posts: 56


« on: August 24, 2009, 06:26:16 AM »

Program of ordination or classification 3D

Name: "CLASS 3D"

lrcvs 24.08.09

( Is limited, but...power)

CLS

DIM a$(9, 9, 9)

FOR n = 1 TO 1000
RANDOMIZE TIMER
x$ = LTRIM$(STR$(INT(RND * 999)))
IF LEN(x$) < 3 THEN l$ = STRING$(3 - (LEN(x$)), "0"): x$ = l$ + x$
a$(VAL(LEFT$(x$, 1)), VAL(MID$(x$, 2, 1)), VAL(RIGHT$(x$, 1))) = x$
NEXT n

FOR x = 0 TO 9
FOR y = 0 TO 9
FOR z = 0 TO 9

IF a$(x, y, z) <> "" THEN PRINT a$(x, y, z); " ";

NEXT z, y, x
Logged
Ninkazu
Been there, done that
*****
Posts: 1169



WWW
« Reply #1 on: August 24, 2009, 02:48:53 PM »

I understand what this does, but I don't know why you wrote it. What use is it?
Logged

am an asshole. Get used to it.
Clippy
Member
*
Posts: 84



« Reply #2 on: August 24, 2009, 03:52:00 PM »

NONE OF COURSE! LOL  Grin
Logged

lrcvs
Member
*
Posts: 56


« Reply #3 on: August 24, 2009, 06:09:07 PM »

It is an experiment to test other ways of classifying random numbers.

But the memory of the "DIM" is very limited and I am limited to 1000 numbers.

The result is simple:

Displays the numbers sorted and removes duplicates.

The program does not sort the numbers, just the situation in its proper position.

In listing the "DIM" shows all numbers classified.


Ninkazu: Thanks for your opinion.

Greetings
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!