thaiall logomy background
coding : sort. insertion.asp.
my town
Source : Perl | PHP | ASP | JSP | HTML | HTML5 | JavaScript | Java | COBOL | C++ | MS Access | VBNet | VB | Python | โค้ดดี
File : insertion.asp. ID : 2204
Skin : Default | Sons-of-obsidian | Sunburst | Highlighter | Full
<%
dim numamt, nummax, nummin, ar(100), tmp, j
numamt = 5 : nummax = 100 : nummin = 50
response.write("Before sorted by insertion sort<br>")
randomize
for i = 1 to numamt
  ar(i) = int(nummin  + (rnd * ( nummax - nummin + 1 )))
  response.write( i & " : " & ar(i) & "<br>")                
next
for i = 2 to numamt
  tmp = ar(i)
  j = i - 1
  do while (tmp < ar(j)) and (j > 0)
    ar(j + 1) = ar(j)
    j = j - 1 
  loop
  ar(j + 1) = tmp  
next
response.write("<hr>After sorted by insertion sort<br>")
for i = 1 to numamt  
  response.write( i & " : " & ar(i) & "<br>")                
next
%>


จำนวน : 25 บรรทัด
าษาเฮชทีเอ็มแอล (HTML = HyperText Markup Language) คือ ภาษาคอมพิวเตอร์ที่ออกแบบมาเพื่อใช้ในการสร้างเว็บเพจที่เรียกดูผ่านทางเว็บเบราว์เซอร์ (Web Browser) เริ่มพัฒนาโดย ทิม เบอร์เนอรส์ ลี (Tim Berners Lee) ในปัจจุบัน HTML ล่าสุดคือ รุ่น 5 เป็นมาตรฐานหนึ่งของ ISO ซึ่งจัดการโดย World Wide Web Consortium (W3C) ในปัจจุบัน ทาง W3C ผลักดัน รูปแบบของ HTML แบบใหม่ ที่เรียกว่า XHTML รุ่นแรกคือ 1.0 (ม.ค.2543) ซึ่งมีโครงสร้างเป็นแบบ XML (eXtensible Markup Language)
ตัวอย่าง Hello World
ปรับปรุงโปรแกรม source.pl : 2565-07-24
rspsocial
Thaiall.com