0% found this document useful (0 votes)
25 views4 pages

Dim As Integer Dim As Integer Dim As String: Console Console

The document contains code to: 1) Prompt the user to enter values for two arrays (m1 and m2) of size 10. 2) Loop through the arrays and output the product of the values at each index. 3) Prompt the user to enter a username and password, and check if it matches the stored values within 3 attempts before outputting an error. 4) Prompt the user to enter a number of values, store them in an array, sort the array in ascending order and output the sorted values.

Uploaded by

HS PC
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views4 pages

Dim As Integer Dim As Integer Dim As String: Console Console

The document contains code to: 1) Prompt the user to enter values for two arrays (m1 and m2) of size 10. 2) Loop through the arrays and output the product of the values at each index. 3) Prompt the user to enter a username and password, and check if it matches the stored values within 3 attempts before outputting an error. 4) Prompt the user to enter a number of values, store them in an array, sort the array in ascending order and output the sorted values.

Uploaded by

HS PC
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Dim m1(10), m2(10) As Integer Dim x, x1, x2 As Integer Dim a, b As String X = 0 x2 = 0 a = 0 b = 0 Do While (X < 4) a = CStr(X + 1) Console.WriteLine("INGRESE M1(X) = Console.

ReadLine() X = X + 1 Loop

VALOR

" + a )

Do While (x2 < 4) b = CStr(x2 + 1) Console.WriteLine("INGRESE VALOR M2(x2) = Console.ReadLine() x2 = x2 + 1 Loop

" + b)

Do While (X1 < 4)

Console.WriteLine(m1(X1) * m2(X1))

X1 = X1 + 1 Loop Console.ReadLine()

Module Module1

Sub Main() Dim INTENTO As Integer

Dim US As String Dim CL As String

Dim VUS As String Dim VCL As String INTENTO = 0

US = "INES" CL = 67890

Do While (INTENTO < 3)

Console.WriteLine("INGRESE SU USUARIO") VUS = Console.ReadLine() Console.WriteLine("INGRESE SU CLAVE") VCL = Console.ReadLine()

If (US = VUS) And (CL = VCL) Then Console.WriteLine("SALUDOS Console.ReadLine() " + US + " BIENVENIDO A TU CUENTA")

Else Console.WriteLine("") Console.WriteLine("*************************")

Console.WriteLine("EL PROCESO SE HA ERRADO") Console.WriteLine("*************************")

INTENTO = INTENTO + 1 End If

Loop

End Sub

End Module

Dim cantnum, aux, i, j As Integer Console.WriteLine("INGESAR LA CANTIDAD DE NUMEROS: ") cantnum = Console.ReadLine()

Dim cajanum(cantnum + 1) As Integer

For i = 1 To i <= cantnum Step i = i + 1 Console.WriteLine("INGRESAR NUMERO" & (+i)) cajanum(i) = Console.ReadLine() Next

For i = 1 To i <= cantnum Step i = i + 1 For j = i To j <= cantnum Step j = j + 1 If cajanum(i) < cajanum(j) Then aux = cajanum(i) cajanum(i) = cajanum(j) cajanum(j) = aux End If Next Next Console.WriteLine("LOS NUMEROS ORDENADOS SON: ")

For i = 1 To i <= cantnum Step i = i + 1 Console.WriteLine(cajanum(i)) Next

Console.ReadKey()

You might also like