ݺߣ

ݺߣShare a Scribd company logo
TRABAJO DE CASE
POR: ANGEL YASACA, JONATHAN LLANGO , GUAMAN EDISON.
SEXTO “E”
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) 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) Then
vectemp = vector(j)
vector(j) = vector(i)
vector(i) = vectemp
End If
Next
Next
For i = 1 To n
TextBox2.Text = TextBox2.Text & vector(i) & vbCrLf
Next i
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox1.Text = " "
TextBox2.Text = " "
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button3.Click
End
End Sub
End Class
Trabajo de case

More Related Content

Trabajo de case

  • 1. TRABAJO DE CASE POR: ANGEL YASACA, JONATHAN LLANGO , GUAMAN EDISON. SEXTO “E” Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 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) Then vectemp = vector(j) vector(j) = vector(i) vector(i) = vectemp End If Next Next For i = 1 To n TextBox2.Text = TextBox2.Text & vector(i) & vbCrLf Next i End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Text = " " TextBox2.Text = " " End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End End Sub End Class