ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] «Ø¥ß¼Æ¦r¹CÀ¸

[µo°Ý] «Ø¥ß¼Æ¦r¹CÀ¸

³o¼Ë¤l¥u¯à¶]2¦¸¥i¥H¤@ª½­«½Æ²q¶Ü? ©ÎªÌ¥i³]©w²q´X¦¸ ( 1a2b ªº¹CÀ¸)
¤wª¾¼Æ¦r¥i¥HÁôÂãv~ª½¨ì²q¹ï¤~¥X²{µª®×
½Ð¤j¤jÀ°¦£ ¥H¤U¬O­ì©l½X

<HTML>
<HEAD>
<TITLE>²q¼Æ¦r</TITLE>
</HEAD>
<BODY>
<H3>²q¼Æ¦r</H3><HR>

<FROM>

<INPUT NAME="Button1" TYPE="BUTTON" VALUE="½Ð«ö³o¸Ì">

</FROM>

</body>


<script language=vbscript>

dim a(4)
dim d(4)
dim b
dim intNo,j,c,m,n

randomize timer()

i=1

a(1)=int(rnd()*10)
b=Cstr(a(1))


for i=2 to 4  '¥Ñ¹q¸£ÀH¾÷²£¥Í¤@²Õ¥|­Ó¤£¦Pªº¼Æ¦r

c=0
   do until c>0
    a(i)=int(rnd()*10)
    c=1
    for j=1 to i-1
      if a(i)=a(j) then c=0
    next
   loop

b=b+Cstr(a(i))
next


Message = b   ' ³]©w´£¥Ü°T®§¡C
Title = "²q¼Æ¦r"  

sub Button1_onClick()

m=0
n=0
b=""


c=InputBox(Message, Title, b )

d(1)=int(c/1000)  '§â¿é¤Jªº¼Æ¦r¤À¸Ñ¦¨ ¤d¦ì, ¦Ê¦ì, ¤Q¦ì, ­Ó¦ì, ¨Ã§âµ²ªG©ñ¤J¤@­Ó°}¦C¤¤
c=c-d(1)*1000
d(2)=int(c/100)
c=c-d(2)*100
d(3)=int(c/10)
c=c-d(3)*10
d(4)=c

for i=1 to 4     '§PÂ_¿é¤J¼Æ¦r»Pµª®×ªº²Å¦Xµ{«×
   for j=1 to 4
    if d(i)=a(j) and i=j then m=m+1
    if d(i)=a(j) and i<>j then n=n+1
   next
next
     
if m=4 then

msgbox "congratulation! ²q¹ï¤F"

else

InputBox d(1)&d(2)&d(3)&d(4)& "------" & m & "A" & n & "B"

end if

end sub

</script>
</html>
¶}¤ß¾Ç²ß,¾Ç²ß«Ü¶}¤ß

§A¥i¥H¸Õ¸Õ¬Ýreturn;
¤j®a¦n,§Ú¬OÄг½!

TOP

        ÀR«ä¦Û¦b : ¦³®É·í«äµL®É­W¡A¦n¤Ñ­n¿n«B¨Ó³¡C
ªð¦^¦Cªí ¤W¤@¥DÃD