際際滷

際際滷Share a Scribd company logo
Publicclass fron 1
Pivatesub button1_click(byval sender as systeam,object,byval e as
System.eventargal) handles button1.click
Dim n,I,j, vectemp as integer
N=val(textbox1.text)
Dim vector (n) as integer
For i=1 TO N
VECTOR(I)=INPUTBOX(VECTOR& I)
NEXT I
FOR I=1 TO N
FOR J= 1 TO N-1
IF VECTOR (I)>VECTOR(J)THEM
VECTEMP=VECTOR(J)
VECTOR(i)=vector(i)
Vector(i)=vectemp
End if
Next
Next
For i= 1to n
Textbox2.text=textbox2.text & vector(i)&vbcrlf
Next i
End sub
Privatesub labe12_click(byval sender as system.object,buval e as
system.eventargs) handles label12.click
End sub

More Related Content

Ordenara los vectores

  • 1. Publicclass fron 1 Pivatesub button1_click(byval sender as systeam,object,byval e as System.eventargal) handles button1.click Dim n,I,j, vectemp as integer N=val(textbox1.text) Dim vector (n) as integer For i=1 TO N VECTOR(I)=INPUTBOX(VECTOR& I) NEXT I FOR I=1 TO N
  • 2. FOR J= 1 TO N-1 IF VECTOR (I)>VECTOR(J)THEM VECTEMP=VECTOR(J) VECTOR(i)=vector(i) Vector(i)=vectemp End if Next Next For i= 1to n Textbox2.text=textbox2.text & vector(i)&vbcrlf Next i End sub Privatesub labe12_click(byval sender as system.object,buval e as system.eventargs) handles label12.click End sub