Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tell me how they did this! 6

Status
Not open for further replies.
N

"O"ne
"T"wo
"T"hree
"F"our
"F"ive
"S"ix
"S"even
"E"ight
"N"ine
 
drJavajoe: damn your good!! If somethings hard to do, its not worth doing - Homer Simpson
 
I think this thread has been devoted to some Math related funny stuff.
I want to share something similar.

Paste the following html source into notepad and save as 'Think.htm'
Then open that file in IE.

Code:
<html>
<head>
<title>Think</title>
<meta name=Author content='Hypetia'>
<meta name=Generator content='Notepad'>
<script language=vbscript>
animation=1 'animation flag. 0 = disabled, 1 = enabled.
dim p,a,s
sub introduction
	p=0
	a=0
	s=&quot;<h1>Think</h1><br><big>Think a number in the range 0 to 624.&quot;
	s=s & &quot; I'll try to guess that number.<br>&quot;
	s=s & &quot;After thinking the number, click &quot;
	s=s & &quot;<span style=color:orange;cursor:hand&quot;
	s=s & &quot; onclick=nextpage()>here</span> to continue.</big>&quot;
	animate
	status = &quot;Think&quot;
end sub
sub nextpage
	s=&quot;<table border><tr><td align=center colspan=5><big>In which color your&quot;
	s=s & &quot; number is displayed on this table?</big><tr style=cursor:hand>&quot;
	g=split(&quot; cyan magenta limegreen white&quot;)
	for n=1 to 4
		s=s & &quot;<td bgcolor=&quot; & g(n) & &quot; onclick=response(&quot; & n & &quot;)>&quot;
	next
	s=s & &quot;<td align=center onclick=response(0) bordercolor=#000040&quot;
	s=s & &quot; style=font-size:10pt width=20%>Not Displayed&quot;
	s=s & &quot;<tr><td colspan=5><table style=font-size:9pt></tr><tr>&quot;
	for n=0 to 624
		u=n\5^p mod 5
		if u then
			s=s & &quot;<td style=color:&quot; & g(u) & &quot;>&quot; & n
			c=c+1
			if c=25 then c=0:s=s & &quot;</tr><tr>&quot;
		end if
	next
	animate
end sub
sub response(c)
	a=a+5^p*c
	if p=3 then
		s=&quot;<h1>Think</h1><br>&quot;
		s=s & &quot;<big>I think the number in your mind is &quot; & a & &quot;.<br><br>&quot;
		s=s & &quot;<span style=color:orange;cursor:hand&quot;
		s=s & &quot; onclick=introduction()>[replay]</span></big>&quot;
		animate
	else
		p=p+1
		nextpage
	end if
end sub
sub animate
	if animation then
		doc.filters.revealtrans.transition=4
		doc.filters.revealtrans.apply
		doc.style.visibility=&quot;hidden&quot;
		doc.filters.revealtrans.play .8
	else
		doc.innerhtml=s
	end if
end sub
sub doc_onfilterchange
	if doc.filters.revealtrans.transition=5 then exit sub
	doc.filters.revealtrans.transition=5
	doc.filters.revealtrans.apply
	doc.innerhtml=s
	doc.style.visibility=&quot;&quot;
	doc.filters.revealtrans.play .8
end sub
</script>
</head>
<body bgcolor=#000040 scroll=auto text=white
onselectstart='window.event.returnvalue=0' onload=introduction()>
<div id=doc align=center style='position:absolute;width:100%;
cursor:default;font-family:verdana;filter:revealtrans'></div>
</body>
</html>
 
It is cool how simple that works. It simply divides the number of possible numbers left into 5 groups each time. It mathmatically takes a maximum of 4 subgroupings to narrow it down to just one number. Coding a bit of simple math in the background makes this possible.
 
What the next number in the following sequence?

1
11
21
1211
111221
? Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
312211
three &quot;1&quot;
two &quot;2&quot;
one &quot;1&quot;

This one was hard. The last number describes the number before it.
 
that's right, I was hoping that only the actual number would be shown, because even with that number, the next number could still be a challenge to find Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
An easy one to warm up with:

If 2 x 3 = 6
and
3 x 4 = 14
then what does 5 + 5 = ?

and why?
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
12

That was easy... Its the first one I've got yet... Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
If 2 x 3 = 6
and
3 x 4 = 14
then what does 5 + 5 = ?

12

Why? Because the product is the octal value (14 octal = 12 decimal, 12 oct. = 10 dec.) Nate Gagne
nathan.gagne@verizon.net
AKA Nick Burns - Your Company's Computer Guy
&quot;Would you like me to save your game of Minesweeper first?&quot;

Like my post? Let me know it was helpful!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top