A man and his grandson have the same birthday. For six consecutive years, the man's age was a exact multiple of the boy's age. How old were they at the last birthday?
A table looks nice:
2222222222333333333344444444445555555555666666666677777777778
0123456789012345678901234567890123456789012345678901234567890
1 *************************************************************
2 *.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*.*
3 .*..*..*..*..*..*..*..*..*..*..*..*..*..*..*..*..*..*..*..*..
4 *...*...*...*...*...*...*...*...*...*...*...*...*...*...*...*
5 *....*....*....*....*....*....*....*....*....*....*....*....*
6 ....*.....*.....*.....*.....*.....*.....*.....*.....*.....*..
7 .*......*......*......*......*......*......*......*......*...
8 ....*.......*.......*.......*.......*.......*.......*.......*
9 .......*........*........*........*........*........*........
10 *.........*.........*.........*.........*.........*.........*
11 ..*..........*..........*..........*..........*..........*...
12 ....*...........*...........*...........*...........*........
13 ......*............*............*............*............*..
14 ........*.............*.............*.............*..........
15 ..........*..............*..............*..............*.....
with a nice diagonal starting at 1,61 going to 6,66.
PRINT " ";
FOR a = 20 TO 80
PRINT LEFT$(LTRIM$(STR$(a)), 1);
NEXT
PRINT
PRINT " ";
FOR a = 20 TO 80
PRINT RIGHT$(LTRIM$(STR$(a)), 1);
NEXT
PRINT
FOR i = 1 TO 15
PRINT USING "## "; i;
FOR m = 20 TO 80
IF m / i = INT(m / i) THEN PRINT "*"; : ELSE PRINT ".";
NEXT
PRINT
NEXT
Edited on August 31, 2004, 10:31 am
|
Posted by Charlie
on 2004-08-31 10:27:05 |