1. OptionExplicit
2. Dim a, b, c
3. var = InputBox("Introduce tre números:")
4. MsgBox(a, b, c)
5. If (( a > b) && (a > c)) Then
6. If (b > c)
7. MsgBox(c, b, a)
8. Else
9. MsgBox(b, c, a)
10. EndIf
11. If (( b > a) && (b > c)) Then
12. If (a > c)
13. MsgBox(c, a, b)
14. Else
15. MsgBox(a, c, b)
16. EndIf
17. If (( c > a) && ( c > b)) Then
18. If ( a > b)
19. MsgBox(b, a, c)
20. Else
21. MsgBox(a, b, c)
22. EndIf
23. Inicio
24. Escribir "Ingrese primer numero"
25. Leer Num1
26. Escribir "Ingrese el segundo numero"
27. Leer Num2
28. Escribir "Ingrese el tercer numero"
29. Leer Num3
30. Hacer i<-1;
31. Repetir con i desde 1 hasta 3
32. Si Num1>Num2 Entonces
33. Hacer Temp<-Num1
34. Hacer Num1<-Num2
35. Hacer Num2<-Temp
36. si Num1>Num3 Entonces
37. Hacer Temp<-Num1
38. Hacer Num1<-Num3
39. Hacer Num3<-Temp
40. si Num2>Num3 Entonces
41. Hacer Temp<-Num2
42. Hacer Num2<-Num3
43. Hacer Num3<-Temp
44. {Fin condicional si}
45. {Fin condicional si}
46. {Fin condicional si}
47. {Fin ciclo repetir}
48. Escribir "Los numeros ordenados quedan de la siguiente
manera: "
49. Escribir Num1
50. Escribir Num2
51. Escribir Num3
52. Fin
53. Proceso Mayor_Ascendente
54. definir n1,n2,n3,mayor,menor,medio Como Entero;
55. Escribir "Ingrese el primer numero";
56. Leer n1;
57. Escribir "Ingrese el segundo numero";
58. Leer n2;
59. Escribir "Ingrese el tercer numero";
60. Leer n3;
61. mayor <- 0;
62. Si n1 > n2 Entonces
63. mayor <- n1;
64. medio <- n3;
65. menor <- n2;
66. Si n1 < n3 Entonces
67. mayor <- n3;
68. medio <- n2;
69. menor <- n1;
70. Sino
71. Si n2 > n3 Entonces
72. medio <- n2;
73. menor <- n3;
74. FinSi
75. FinSi
76. Sino
77. mayor <- n2;
78. medio <- n3;
79. menor <- n1;
80. Si n2 < n3 Entonces
81. mayor <- n3;
82. menor <- n1;
83. medio <- n2;
84. Sino
85. Si n1 > n3 Entonces
86. medio <- n1;
87. menor <- n3;
88. FinSi
89. FinSi
90. FinSi
91. Escribir "Los numeros ordenados en orden ascendente
son:", " ",menor," - ",medio," - ",mayor;
92. FinProceso

Ejer

  • 1.
    1. OptionExplicit 2. Dima, b, c 3. var = InputBox("Introduce tre números:") 4. MsgBox(a, b, c) 5. If (( a > b) && (a > c)) Then 6. If (b > c) 7. MsgBox(c, b, a) 8. Else 9. MsgBox(b, c, a) 10. EndIf 11. If (( b > a) && (b > c)) Then 12. If (a > c) 13. MsgBox(c, a, b) 14. Else 15. MsgBox(a, c, b) 16. EndIf 17. If (( c > a) && ( c > b)) Then 18. If ( a > b) 19. MsgBox(b, a, c) 20. Else 21. MsgBox(a, b, c) 22. EndIf 23. Inicio 24. Escribir "Ingrese primer numero" 25. Leer Num1 26. Escribir "Ingrese el segundo numero" 27. Leer Num2 28. Escribir "Ingrese el tercer numero" 29. Leer Num3 30. Hacer i<-1; 31. Repetir con i desde 1 hasta 3 32. Si Num1>Num2 Entonces 33. Hacer Temp<-Num1 34. Hacer Num1<-Num2 35. Hacer Num2<-Temp 36. si Num1>Num3 Entonces 37. Hacer Temp<-Num1 38. Hacer Num1<-Num3 39. Hacer Num3<-Temp 40. si Num2>Num3 Entonces 41. Hacer Temp<-Num2 42. Hacer Num2<-Num3 43. Hacer Num3<-Temp 44. {Fin condicional si} 45. {Fin condicional si} 46. {Fin condicional si} 47. {Fin ciclo repetir} 48. Escribir "Los numeros ordenados quedan de la siguiente manera: " 49. Escribir Num1 50. Escribir Num2 51. Escribir Num3 52. Fin 53. Proceso Mayor_Ascendente 54. definir n1,n2,n3,mayor,menor,medio Como Entero;
  • 2.
    55. Escribir "Ingreseel primer numero"; 56. Leer n1; 57. Escribir "Ingrese el segundo numero"; 58. Leer n2; 59. Escribir "Ingrese el tercer numero"; 60. Leer n3; 61. mayor <- 0; 62. Si n1 > n2 Entonces 63. mayor <- n1; 64. medio <- n3; 65. menor <- n2; 66. Si n1 < n3 Entonces 67. mayor <- n3; 68. medio <- n2; 69. menor <- n1; 70. Sino 71. Si n2 > n3 Entonces 72. medio <- n2; 73. menor <- n3; 74. FinSi 75. FinSi 76. Sino 77. mayor <- n2; 78. medio <- n3; 79. menor <- n1; 80. Si n2 < n3 Entonces 81. mayor <- n3; 82. menor <- n1; 83. medio <- n2; 84. Sino 85. Si n1 > n3 Entonces 86. medio <- n1; 87. menor <- n3; 88. FinSi 89. FinSi 90. FinSi 91. Escribir "Los numeros ordenados en orden ascendente son:", " ",menor," - ",medio," - ",mayor; 92. FinProceso