Programalama > ASP

Etiketler: asp, sayısal, loto

Ort. 0
Puan ver:
******Birinci Sayfa (Kullanıcının Sayı Girdiği Sayfa)*********
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form id="form1" name="form1" method="post" action="iki.asp">
  <table width="100%" border="1">
    <tr>
      <td width="5%">1. sayı</td>
      <td width="95%"><label>
        <input type="text" name="a" id="a" />
      </label></td>
    </tr>
    <tr>
      <td>2.sayı</td>
      <td><label>
        <input type="text" name="b" id="b" />
      </label></td>
    </tr>
    <tr>
      <td>3.sayı</td>
      <td><label>
        <input type="text" name="c" id="c" />
      </label></td>
    </tr>
    <tr>
      <td>4.sayı</td>
      <td><label>
        <input type="text" name="d" id="d" />
      </label></td>
    </tr>
    <tr>
      <td>5.sayı</td>
      <td><label>
        <input type="text" name="e" id="e" />
      </label></td>
    </tr>
    <tr>
      <td>6.sayı</td>
      <td><label>
        <input type="text" name="f" id="f" />
      </label></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td><label>
        <input type="submit" name="button" id="button" value="gönder" />
      </label></td>
    </tr>
  </table>
</form>
</body>
</html>
******İkinci Sayfa(ASP Kodlarının Olduğu Sayfa)**********
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1254"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<title>Untitled Document</title>
</head>

<body>
<p>
  <% 
Dim m(6) , b(6) 
randomize
k=0

b(0)=int(request.form("a"))
b(1)=int(request.form("b"))
b(2)=int(request.form("c"))
b(3)=int(request.form("d"))
b(4)=int(request.form("e"))
b(5)=int(request.form("f"))

 %>
</p>
<table width="59%" border="0">
  <tr>
    <td>Oynadığın Sayılar</td>
    <td>İkramiyeyi Kazandıran Sayılar</td>
  </tr>
  <tr>
    <td><% 
	For i=0 to 5
	response.Write(b(i) & "<br>")
	Next
	 %></td>
    <td><%            
	
        For i = 0 To 5
            m(i) = int(Rnd() * 48 + 1)
            For j = 0 To i - 1
                If m(i) = m(j) Then
				
                    i = i - 1
Exit For
                End If

            Next
			
        Next
		For i = 0 To 5
		response.Write(i & " - " & m(i) & "<br>")
		Next
		
For i=0 to 5
For j=0 to 5
If m(i)=b(j) Then
sayi=b(j)
k=k+1
	
End If
Next
Next
 %></td>
  </tr>
  <tr>
    <td><%response.Write(k & " tane tuttu")%></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="2"><% 
	response.Write("tutan sayılar = " & sayi & " - ")
	 %></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html>


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2024 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.