Subido Por Brenda

Páginas: 8 (1787 palabras) Publicado: 22 de mayo de 2012
qwertyuiopasdfghjklzxcvbnmqwertyui opasdfghjklzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcvbnmqwer Albúm del primer parcial Arreglos y vectores tyuiopasdfghjklzxcvbnmqwertyuiopas dfghjklzxcvbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklzxcvbnmq wertyuiopasdfghjklzxcvbnmqwertyuio pasdfghjklzxcvbnmqwertyuiopasdfghj klzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwerty uiopasdfghjklzxcvbnmqwertyuiopasdf ghjklzxcvbnmqwertyuiopasdfghjklzxc vbnmqwertyuiopasdfghjklzxcvbnmrty uiopasdfghjklzxcvbnmqwertyuiopasdf ghjklzxcvbnmqwertyuiopasdfghjklzxc
23/02/2012 Brenda Isela Galaviz Carpio Ingeniero Alfonzo Zea

1.- Desarrolla un programa que llene un arreglo conlos números del 1 al 5 y los muestre.

Private Sub Command1_Click() Dim a(4) AsInteger y = 10 For x = 0 To 4 a(x) = y y=y+1 Next x For x = 0 To 4 Text1(x).Text = a(x) Next x

End Sub

Private Sub Command2_Click() End End Sub

2.- Desarrolla un programa que llene un arreglo con los números del 1 al 5, pero que el subíndice comience del en 1 al 5.

Private Sub Command1_Click() Dim a(1 To 5) As Integer For x = 1 To 5 a(x) = x Next x For x = 1 To 5 Text1(x - 1).Text =a(x) Next x End Sub Private Sub Command2_Click() End End Sub

3.- Desarrolla un programa que llene un arreglo con 5 números desde el teclado y que posteriormente lo muestre.

Private Sub Command1_Click() Dim a(4) As Integer For x = 0 To 4 a(x) = Text1(x).Text Next x For x = 0 To 4 Text2(x).Text = a(x) Next x End Sub Private Sub Command2_Click() End End Sub

4.- Desarrolla un programa quellene un arreglo con los múltiplos del 5 comprendidos entre 10 y 50 y posteriormente lo muestre.

Private Sub Command1_Click() Dim a(8) As Integer y = 10 For x = 0 To 8 a(x) = y Text1(x).Text = a(x) y=y+5 Next x

End Sub Private Sub Command2_Click() End End Sub

5.- Desarrolla un programa que llene un arreglo con los múltiplos del 3 comprendidos entre 1 y 45, posteriormente los pase a unListBox. El programa debe de permitir borrar diferentes elementos del ListBox, así como reformarlo a su estado original.

Private Sub Command1_Click() Dim a(1 To 45) As Integer y=3 For x = 1 To 15 a(x) = y y=y+3 List1.AddItem (a(x)) Next x End Sub

Private Sub Command2_Click() List1.RemoveItem List1.ListIndex

End Sub

Private Sub Command3_Click() End End Sub

Private Sub Command4_Click()List1.Clear End Sub

6.- Desarrolla un programa que llene un arreglo con los múltiplos del 3 comprendidos entre 1 y 45, posteriormente los pase a un ListBox. El programa debe de permitir borrar diferentes elementos del ListBox, así como reformarlo a su estado original, pero que muestre la selección para borrar en cajas de texto.

Private Sub Command1_Click() Dim a(4) As Double Dim b(4) AsDouble Dim c(4) As Double

s=7 v = 20 o=8

For x = 0 To 4 r = Sqr(s) p = (Cos(v * 3.141592654) / 180) i=1/o a(x) = r b(x) = p c(x) = i

Text1(x).Text = (Format(a(x), "##.###")) Text2(x).Text = (Format(b(x), "##.###")) Text3(x).Text = (Format(c(x), "##.###")) s=s+7 v = v + 20 o=o+8

Next x

End Sub

Private Sub Command2_Click() End End Sub

7.- Desarrolla un programa con 3 arreglos de 5elementos cada uno. En el primer arreglo lo debe de llenar con la raíz cuadrada de los múltiplos del 7 comprendidos entre 1 y 40. El segundo vector con el coseno de los múltiplos del 20 comprendidos entre 1 y 100. El tercer arreglo con el inverso de los múltiplos del 8 comprendidos entre 1 y 45. Debe de manejar 3 controles de matrices.

Private Sub Command1_Click() Dim a(4) As Double Dim b(4)As Double Dim c(4) As Double s=7 v = 20 o=8 For x = 0 To 4 r = Sqr(s) p = Cos(v * 3.141592654) / 180 i=1/o a(x) = r b(x) = p c(x) = i Text1(x).Text = (Format(a(x), "##.###")) Text2(x).Text = (Format(b(x), "##.###")) Text3(x).Text = (Format(c(x), "##.###")) s=s+7 v = v + 20 o=o+8 Next x End Sub Private Sub Command2_Click() End End Sub

8.- Desarrolla un programa que muestre llene un arreglo con...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Brenda
  • brenda
  • Brenda
  • Brenda
  • Brenda
  • brenda
  • Brenda
  • Brenda

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS