Estudiante

Páginas: 3 (503 palabras) Publicado: 22 de noviembre de 2012
ACTIVIDA #4

1.PROGRAMA Q LEE UN VECTOR LO CARGA Y LUEGO LO MUESTRA EN OREDEN INVERSO

EJEMPLO

|7 |8 |-1 |4 |7|


1 2 3 4 5

MOSTRAR:7,4,-1,,8,7

2.PROGRAMA QUE MUESTRAE IMPLEMENTA UN MENU CON LAS SIGUIENTES OPCIONES

A)SUMA DE ELEMWNTO DEL VECTOR

B)SUMA DE ELEMENTOS PARES Y SUMA DE ELEMENTOS IMPARES

C)SUMA DE LEMENTOS POSITIVOS NEGATIVOS Y NULOS

SALIREJEJMLPO2

MENU

1.SUMADE ELEMENTO:

1 2 3 4 5

|7 |8 |-1 |4 |7 |


SUMA =25

2.SUMA DE ELEMENTOS PARES=12

SUMA DE ELEMTOS IMPARES=13

3. PROGRAMA QUECARGA UN VECTOR Y LUEGO RELISA LA BUSQUEDA DE UN NUMERO ELEMENTO DENTRO DE UN VECTROR EL VALOR DDEL ELEMENTO DE NUMERO DEBE SER DADO POR EL USUARIO SI EL NUMERO SE ENCUENTRA EN EL VECTOR DEBUELVE LAPOSICION O INDICE EN LA Q SE ENCUENTRA. SI NO EXISTE EL UMERO EN EL VECTOR EN EL NUMERO Y LUEGO IMPRIME

EJEMPLO3

SUMA POSITIVOS=26

SUMANEGATIVOS=-1

SUMA NULOS=0



EJEMPLOS EN CLASEFECHA15/11/12

EJEMPLO 2

Sub Main()
Dim d As String
Dim m As Integer
Dim vectorA(50) As Integer
Dim opcion As Integer
Dim sidpar, sidimp As Integerd = "s"
While d = "s"
Console.WriteLine("menu principal ")
Console.WriteLine("1. suma elementos indice par ")
Console.WriteLine("2. suma elementosindice impar ")
Console.WriteLine("3.salir")
Console.WriteLine("digite una opcion")
opcion = CInt(Console.ReadLine())
If opcion = 1 Or opcion = 2Then
Console.Write("longitud del vector: ")
m = CInt(Console.ReadLine())
cargar_vector(m, vectorA)


End If
Select...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Estudiante
  • Estudiante
  • Estudiante
  • Estudiante
  • El estudiante
  • Estudiante
  • Estudiante
  • Estudiante

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS