Yael Garcia Cruz

Páginas: 6 (1255 palabras) Publicado: 21 de abril de 2015
Yael Garcia Cruz
Programación
Tabla de multiplicar
ANALISIS
Declarar Variables Diagrama de flujo con Prueba de escritorio
Pedir La Tabla A desear
repetir 10 Veces
Operaciones a realizar
Imprimir Resultados
Seudocódigo
Inicio
Declarar Variables
Pedir Tabla A Desear
PARA i = 1 Hasta 10
Resultado = Tabla Desarrollar *i (1)
Imprimir Resultado
Fin
Código Visual Basic
Sub tabla()
Dim tabla As Integer
Dim tablaDesplegar As String
Dim jugarOtraVes As String
Do
tablaDesplegar = ""
tabla = InputBox("ingrese la tabla a desarrollar")
For i = 1 To 10
tablaDesplegar = tablaDesplegar & tabla & "x" & i & "=" & tabla * i & vbCrLf
MsgBox tablaDesplegar
Next
jugarOtraVes = InputBox("¿Quieres volver a jugar?")
Loop UntiljugarOtraVes <> "si"
End Sub


Volado electrónico
ANALISIS Diagrama de flujo con Prueba de escritorio
Generar un numero aleatorio entre 1 y 2
Sol y Águila
Imprimir Resultado
Seudocódigo
Inicio
Declarar Variables
Generar Aleatorio Entre 1 Y 2
SOLES = SOLES + 1
AGUILAS = AGUILAS + 1
Generar opciones
ImprimirSoles Y Águilas
Generar reinicio si se desea
Fin
Código visual Basic
Sub VoladoElectronico()
Dim aleatorio As Integer
Dim seguirJugando As String
' aleatorio = (limsup - liminf) * Rnd + liminf
Do
aleatorio = (2 - 1) * Rnd + 1
MsgBox aleatorio
If aleatorio = 1 Then
MsgBox "SOL"
Else
MsgBox "AGUILA"
End If
seguirJugando = InputBox("Quieres Seguir Jugando: Si o No ?")
Loop Until seguirJugando <> si
EndSub



Piedra Papel o Tijera
ANALISIS
Declarar Variables A Utilizar Diagrama de flujo con Prueba de escritorio
Generar 3 Números Aleatorios En 1 Y 2
Imprimir Resultado
Seudocódigo
Inicio
Declarar variables
Generar aleatorios
Select case y generar los casos
Final de Select
Imprimir resultados
Fin
Código visual Basic
SubpiedraPapelTijeras()
Dim jugadorUno As Integer
Dim jugadorDos As Integer
Dim resultado As String
jugadorUno = (3 - 1) * Rnd + 1
jugadorDos = (3 - 1) * Rnd + 1
resultado = jugadorUno & "-" & jugadorDos
Select Case resultado
Case "1-1":
MsgBox "Piedra,Piedra"
MsgBox "Empate"
Case "2-2":
MsgBox "Papel,Papel"
MsgBox "Empate"
Case "3-3":
MsgBox "Tijera,Tijeras"
MsgBox "Empate"
Case "1-2":
MsgBox "Piedra,Papel"MsgBox "Jugador Ganador: Dos"
Case "1-3":
MsgBox "Piedra,Tijeras"
MsgBox "Jugador Ganador: Uno"
Case "2-1":
MsgBox "Papel,Piedra"
MsgBox "Jugador Ganador: Uno"
Case "2-3":
MsgBox "Papel,Tijeras"
MsgBox "Jugador Ganador: Dos"
Case "3-1":
MsgBox "Tijeras,Piedra"
MsgBox "Jugador Ganador: Dos"
Case "3-2"
MsgBox "Tijera,Papel"
MsgBox "Jugador Ganador: Uno"
End Select
MsgBox "Fin del Juego"End Sub


Área de un cilindro
AREA DEL CILINDRO Diagrama de flujo con Prueba de escritorio
ANALISIS
Declarar Variables A Utilizar
Ingresar Altura
Ingresar Radio
Calcular Área Y Volumen
Seudocódigo
Inicio
Declarar variables
Hacer
Ingresar altura y radio
Área = (2* pi* radio * altura)
Ingresar altura y radio
Volumen = ( pi *radio^2 * altura )


Código visual Basic
Sub AreaCilindro()
Dim Altura As Double
Dim area As Double
Dim volumen As Double
Dim radio As Double
Dim pi As Double
Dim SeguirJugando As String
Do
pi = 3.1416
Altura = InputBox("Ingrese Altura")
radio = InputBox("Ingrese Radio")

area = (2 * pi * radio * Altura)
MsgBox "Area del Cilindro= " & area
Altura = InputBox("Ingrese Altura")
radio = InputBox("IngreseRadio")
volumen = (pi * radio ^ 2 * Altura)
MsgBox "Volumen del Cilindro= " & volumen
SeguirJugando = InputBox("Quieres Seguir Jugando?")
Loop Until SeguirJugando <> "SI"
End Sub






Área de un Triangulo
Declarar Variables A Utilizar Diagrama de flujo con Prueba de escritorio
Ingresar Base
Ingresar Altura
Calcular Área
Imprimir...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Yael
  • Juan De La Cruz Y El Misterio Del Hombre. Ciro García.
  • Yael
  • Yael
  • yael
  • Resumen De Caso Garcia Reyes Vs. Cruz Auto
  • Yael
  • CRUZ MILLAN GARCIA PARA IMPRIMIR

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS