- When completed, this crossnumber puzzle has exactly one digit in each box.
- None of the a,b,c or d boxes (whether down or across) can contain any leading zero.
- Both concatenations ab and cd consist of nonzero digits.
+-----+-----+
| a | b |
+-----+-----+-----+
| c | | |
+-----+-----+-----+
| d | |
+-----+-----+
ACROSS DOWN
a. Abigail's age a. Sum of three of the ages
in c "across".
c. Sum of Abigail's age,
Blanche's age, Cynthia's b. Cynthia's age.
age, and Darlene's age.
c. Darlene's age.
d. Blanche's age
Whose age was omitted in
a "down" category?
CLS
FOR abi = 10 TO 99
FOR bla = 10 TO 99
FOR cyn = 10 TO 99
FOR dar = 10 TO 99
ab$ = LTRIM$(STR$(abi))
IF RIGHT$(ab$, 1) <> "0" THEN
bl$ = LTRIM$(STR$(bla))
cy$ = LTRIM$(STR$(cyn))
da$ = LTRIM$(STR$(dar))
IF RIGHT$(da$, 1) <> "0" AND RIGHT$(da$, 1) = LEFT$(bl$, 1) AND RIGHT$(ab$, 1) = LEFT$(cy$, 1) THEN
tot = abi + bla + cyn + dar
IF tot > 99 AND tot < 1000 THEN
t$ = LTRIM$(STR$(tot))
IF LEFT$(t$, 1) = LEFT$(da$, 1) AND RIGHT$(t$, 1) = RIGHT$(cy$, 1) THEN
aDown$ = LEFT$(ab$, 1) + MID$(t$, 2, 1) + RIGHT$(bl$, 1)
aDn = VAL(aDown$)
IF aDn = tot - abi OR aDn = tot - bla OR aDn = tot - cyn OR aDn = tot - dar THEN
PRINT " "; ab$
PRINT t$
PRINT bl$;
SELECT CASE tot
CASE abi + aDn
PRINT " Abigail"
CASE bla + aDn
PRINT " Blanche"
CASE cyn + aDn
PRINT " Cynthia"
CASE dar + aDn
PRINT " Darlene"
END SELECT
PRINT
END IF
END IF
END IF
END IF
END IF
NEXT
NEXT
NEXT
NEXT
finds
16
200
95 Blanche
|
Posted by Charlie
on 2013-03-19 14:36:14 |