Firstly to FrankM. What precludes C not being "0"? A simple substitution of that value necessarily renders D to "0".
The following program listing:......
CLS
PRINT "Increase from 0 to 100"
FOR c = 0 TO 100
FOR d = 0 TO 100
IF (c * c - 3 * c * d = c - d) THEN PRINT c, d
NEXT
NEXT
PRINT "both negatives"
FOR c = -100 TO 0 STEP 1
FOR d = -100 TO 0 STEP 1
IF (c * c - 3 * c * d = c - d) THEN PRINT c, d
NEXT
NEXT
PRINT "C pos D neg"
FOR c = 0 TO 100
FOR d = -100 TO 0 STEP 1
IF (c * c - 3 * c * d = c - d) THEN PRINT c, d
NEXT
NEXT
PRINT "C neg D pos"
FOR c = -100 TO 0 STEP 1
FOR d = 0 TO 100
IF (c * c - 3 * c * d = c - d) THEN PRINT c, d
NEXT
NEXT
............produced this as a screen output:
Increase from 0 to 100
0 0
1 0
both negatives
0 0
C pos D neg
0 0
1 0
C neg D pos
0 0
To look for integer pairs I chose the respective possible pairings of positive and negative within the |100| range certain of the outcome anyway.
|
Posted by brianjn
on 2008-04-15 23:34:25 |