Page 2 of 2

Posted: Wed Nov 02, 2005 4:38 pm
by Guest
* Can i get rid of the LTRIM$ and RTRIM$ for u$, d$, t$, q$ ????
My teacher told me to use them but i dont know what they do....and when i get rid of them the program just prints the black scren......can someone help me??? * She also told me to use bns at the bottom of the program....what is that for and can i ghet rid of that??? *



CLS
FOR q = 10 TO 99
FOR p = 10 TO 99

c$ = LTRIM$(RTRIM$(STR$(q * p)))


u$ = LEFT$(LTRIM$(RTRIM$(STR$(q))), 1) 'factor 1 byte 1
d$ = RIGHT$(LTRIM$(RTRIM$(STR$(q))), 1) 'factor 1 byte 2
t$ = LEFT$(LTRIM$(RTRIM$(STR$(p))), 1) 'factor 2 byte 1
q$ = RIGHT$(LTRIM$(RTRIM$(STR$(p))), 1) 'factor 2 byte 2

bc$ = ""

IF q$ + t$ + d$ + u$ = c$ OR q$ + t$ + u$ + d$ = c$ OR q$ + d$ + t$ + u$ = c$ THEN bc$ = c$
IF q$ + d$ + u$ + t$ = c$ OR q$ + u$ + t$ + d$ = c$ OR q$ + u$ + d$ + t$ = c$ THEN bc$ = c$
IF t$ + q$ + d$ + u$ = c$ OR t$ + q$ + u$ + d$ = c$ OR t$ + d$ + q$ + u$ = c$ THEN bc$ = c$
IF t$ + d$ + u$ + q$ = c$ OR t$ + u$ + q$ + d$ = c$ OR t$ + u$ + d$ + q$ = c$ THEN bc$ = c$
IF d$ + q$ + t$ + u$ = c$ OR d$ + q$ + u$ + t$ = c$ OR d$ + t$ + q$ + u$ = c$ THEN bc$ = c$
IF d$ + t$ + u$ + q$ = c$ OR d$ + u$ + q$ + t$ = c$ OR d$ + u$ + t$ + q$ = c$ THEN bc$ = c$
IF u$ + q$ + t$ + d$ = c$ OR u$ + q$ + d $ + t$ = c$ OR u$ + t$ + q$ + d$ = c$ THEN bc$ = c$
IF u$ + t$ + d$ + q$ = c$ OR u$ + d$ + q$ + t$ = c$ OR u$ + d$ + t$ + q$ = c$ THEN bc$ = c$

IF bc$ <> "" AND INSTR(bns$, bc$) = 0 THEN bns$ = bns$ + bc$: PRINT q; "x"; p; "= "; bc$

NEXT p
NEXT q

Posted: Wed Nov 02, 2005 5:05 pm
by Kyle
If you don't know what they do, search the forum. This question was answered only a few days ago.

Posted: Wed Nov 02, 2005 6:13 pm
by Guest
Yes, i know that but can i get rid of dupe$...????