All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Ages (Posted on 2004-08-31)
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?

 See The Solution Submitted by Federico Kereki Rating: 3.0000 (7 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 chart | Comment 4 of 10 |

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

 Search: Search body:
Forums (0)