Académique Documents
Professionnel Documents
Culture Documents
III-Nocturno
Crear un arreglo llamado num que almacene los siguientes datos: 20, 14, 8, 0, 5, 19 y 24.
a) EN PSEINT
Proceso Ejercicio_01
// CREAR UN ARREGLO LLAMADO NUM QUE ALMACENE LOS SIGUIENTES DATOS: 20, 14, 8, 0, 5, 19 y 24
// creamos el arreglo le damos un nombre y un tamao de 7 posiciones
Dimension num[7]
Module Module1
Sub Main()
Dim NUM(7) As Integer
End Sub
End Module
Ejercicio N 02
Crear un arreglo llamado num que almacene los siguientes datos: 20, 14, 8, 0, 5, 19 y 24 con funcin
FOR NEXT (PARA)
a) EN PSEINT
Proceso Ejercicio_02
// CREAR UN ARREGLO LLAMADO NUM QUE ALMACENE LOS SIGUIENTES DATOS: 20, 14, 8, 0, 5, 19 y 24 CON
CICLO FOR NEXT....
// creamos el arreglo le damos un nombre y un tamao de 7 posiciones
Dimension num[7]
Module Module1
Sub Main()
Dim NUM(7) As Integer
End Module
Ejercicio N 03
Crear un arreglo de 5 posiciones y llnelo con los nmeros que el usuario desee.
a) EN PSEINT
Proceso Ejercicio_03
//CREAR UN ARREGLO DE 5 POSICIONES Y LLENELO CON LOS NUMEROS QUE DESEE
//creamos el arreglo le damos un nombre y un tamao de 5 posiciones
Dimension num[5];
FinPara
FinPara
FinProceso
b) EN CONSOLA VISUAL.NET
Module Module1
Sub Main()
Dim NUM(5) As Integer
Dim numero As Integer
NUM(i) = numero
Next
For i As Integer = 0 To 5 - 1
Console.WriteLine("El dato en la posicion " & i & " es: " & NUM(i))
Next
Console.ReadLine()
End Sub
End Module
Ejercicio N 04
a) EN PSEINT
Proceso Ejercicio_04
FinPara
Module Module1
Sub Main()
Dim n As Integer
Console.ReadLine()
End Sub
End Module
Ejercicio N 05
Crear un arreglo de n posiciones y llenarlo con los nmeros que el usuario desee.
a) EN PSEINT
Proceso Ejercicio_05
//pedimos el tamao
Escribir "Digite el tamano del arreglo";
Leer n;
FinPara
Module Module1
Sub Main()
Dim n, numero As Integer
'Pedimos el tamao
Console.WriteLine("Digite el tamao del arreglo")
n = Console.ReadLine()
Next
For i As Integer = 0 To n
Console.WriteLine("El dato en la posicion " & i & " es: " & num(i))
Next
Console.ReadLine()
End Sub
End Module
Ejercicio N 06
Crear dos arreglos uno que almacene 2 nombres y otro que almacene 3 nmeros.
a) EN PSEINT
Proceso Ejercicio_06
FinPara
Module Module1
Sub Main()
Dim arreglo1(2), arreglo2(3) As String
arreglo2(1) = 74
arreglo2(2) = 56
arreglo2(3) = 10
Console.WriteLine("Arreglo 1")
For i As Integer = 1 To 2
Console.WriteLine("El dato en la posicion " & i & " es: " & arreglo1(i))
Next
Console.WriteLine("Arreglo 2")
For i As Integer = 1 To 3
Console.WriteLine("El dato en la posicion " & i & " es: " & arreglo2(i))
Next
Console.ReadLine()
End Sub
End Module
Ejercicio N 07
a) EN PSEINT
Proceso Ejercicio_07
acum<-0;
//pedimos el tamao
Escribir "Digite el tamano del vector (arreglo)";
Leer t;
Module Module1
Sub Main()
Dim acum, t As Integer
acum = 0
Next
Next
'resultado total
Console.WriteLine("Es:" & acum)
Console.ReadLine()
End Sub
End Module
Ejercicio N 08
a) EN PSEINT
Proceso Ejercicio_08
Escribir "Digite el tamano del vector 2"; //pedimos el tamao para el vector 2
Leer t;
Para i<-1 Hasta t Con Paso 1 Hacer //llenamos el arreglo con un ciclo para
Escribir "Digite un numero ",i; //pedimos los numeros
Leer num;
Module Module1
Sub Main()
Dim t, acum, acum2 As Integer
acum = 0
acum2 = 0
Dim num, vector1(t) As Integer 'creamos el primer arreglo y le pasamos el tamao ingresado
For i As Integer = 1 To t
For i As Integer = 1 To t
Console.ReadLine()
End Sub
End Module