La descarga está en progreso. Por favor, espere

La descarga está en progreso. Por favor, espere

Camila Rodríguez 1º B. DIAGRAMA: PANTALLA: PROGRAMACION Private Sub CommandButton1_Click() Dim NumeroA As Integer Label1 = "ingrese un numero" NumeroA.

Presentaciones similares


Presentación del tema: "Camila Rodríguez 1º B. DIAGRAMA: PANTALLA: PROGRAMACION Private Sub CommandButton1_Click() Dim NumeroA As Integer Label1 = "ingrese un numero" NumeroA."— Transcripción de la presentación:

1 Camila Rodríguez 1º B

2 DIAGRAMA:

3 PANTALLA:

4 PROGRAMACION Private Sub CommandButton1_Click() Dim NumeroA As Integer Label1 = "ingrese un numero" NumeroA = Val(TextBox1) If NumeroA > 5 Then Label3 = "si" Else Label3 = "no" End If End Sub

5 DIAGRAMA: 1. Ingresar un número cualquiera e informar si es positivo, negativo o nulo. C NUMERO NUMERO = 0 NULO VERDADERO NUMERO > 0 POSITIVO VERDADERO NEGATIVO FALSO F

6 PANTALLA:

7 PROGRAMACION: Private Sub CommandButton1_Click() Dim Numero1 As Integer Numero1 = Val(TextBox1) If Numero1 = 0 Then Label3 = ("El numero es nulo") Else If Numero1 > 0 Then Label3 = ("El numero es Positivo") Else Label3 = ("El numero es negativo") End If End If End Sub

8 DIAGRAMA: 2. Ingresar 4 número cualesquiera. Informar el total si todos son positivos. Si no, informar "ingrese números positivos solamente". C NUMERO 1 NUMERO 2 NUMERO 3 NUMERO 4 NUMERO1,2,3, 4 > 0 SUMA= N1 + N2 + N3 + N4 SI POSITIVOS SOLAMENTE NO F

9 PANTALLA:

10 PROGRAMACION: Private Sub CommandButton1_Click() Dim n1 As Integer Dim n2 As Integer Dim n3 As Integer Dim n4 As Integer n1 = Val(TextBox1) n2 = Val(TextBox2) n3 = Val(TextBox3) n4 = Val(TextBox4) If n1 > 0 And n2 > 0 And n3 > 0 And n4 > 0 Then Label3 = n1 + n2 + n3 + n4 Else Label3 = ("ingrese numeros positivos solamente") End If End Sub

11 DIAGRAMA 3. Ingresar dos números cualesquiera. Informar "ambos positivos", "ambos negativos", "primero positivo y segundo no" o "segundo positivo y primero no" C NUMERO 1 NUMERO 2 N1 and N2 > 0 AMBOS POSITIVOS N1 AND N2 < 0 AMBOS NEGATIVOS N1 >0 AND N2 <0 PRIMERO POSITIVO Y SEGUNDO NEGATIVO N1 0 PRIMERO NEGATIVO Y SEGUNDO POSITIVO F

12 PANTALLA:

13 PROGRAMACION Private Sub CommandButton1_Click() Dim n1 As Integer Dim n2 As Integer n1 = Val(TextBox1) n2 = Val(TextBox2) If n1 > 0 And n2 > 0 Then Label3 = ("Ambos Positivos") End If If n1 < 0 And n2 < 0 Then Label3 = ("Ambos Negativos") End If If n1 > 0 And n2 < 0 Then Label3 = ("Primero Positivo y Segundo Negativo") End If If n1 0 Then Label3 = ("Prmero Negativo y Segundo Positivo") End If End Sub

14 DIAGRAMA 4. Ingresar dos números enteros cualesquiera. Informar "el primero es mayor que el segundo", "el segundo es mayor que el primero" o "son iguales" según corresponda. C N 1 N 2 N1 > N2 EL PRIMEROES MAYOR QUE EL SEGUNDO N1 < N2 EL SEGUNDO ES MAYOR QUE EL PRIMERO N1 = N2 SON IGUALES F

15 PANTALLA

16 PROGAMACION Private Sub CommandButton1_Click() Dim n1 As Integer Dim n2 As Integer n1 = Val(TextBox1) n2 = Val(TextBox2) If n1 > n2 Then Label3 = ("El primero es mayor que el segundo") End If If ni < n2 Then Label3 = ("El segundo es mayor que el primero") End If If n1 = n2 Then Label3 = (" Son iguales") End If End Sub

17 DIAGRAMA 5. Ingresar cuatro números cualesquiera, si su suma es mayor a 15 elevarlo al cuadrado, si no, elevarlo al cubo. C N1 N2 N3 N4 N1 + N2 + N3 + N4 = R >15 R*R N1 + N2 + N3 + N4 = R <15 R*R*R F

18 PANTALLA

19 PROGRAMACION Private Sub CommandButton1_Click() Dim n1 As Integer Dim n2 As Integer Dim n3 As Integer Dim n4 As Integer Dim R As Integer n1 = Val(TextBox1) n2 = Val(TextBox2) n3 = Val(TextBox3) n4 = Val(TextBox4) R = n1 + n2 + n3 + n4 If R > 15 Then Label3 = R * R End If If R < 15 Then Label3 = R * R * R End If End Sub

20 DIAGRAMA 6. Ingresar un número cualquiera e informar si es par o impar C N1 RESULTADO = N1 MOD2 RESULTA DO = 1 IMPAR PAR SI NO F

21 PANTALLA

22 PROGRAMACION Private Sub CommandButton1_Click() Dim n1 As Integer Dim Resultado As Integer n1 = Val(TextBox1) If n1 < 0 Then Label3 = ("Por favor ingrese números mayores a 0") Else Resultado = n1 Mod 2 If Resultado = 1 Then Label3 = ("Impar") Else Label3 = ("Par") End If End Sub

23 DIAGRAMA 7. Ingresar dos números, sumarlos e informar si la suma da por resultado un número par o impar. C N1 N2 N1 + N2 = >0 RESULTADO ES PAR N1 + N2 = <0 RESULTADO ES IMPAR F RESULADO = SUMA MOD2

24 PANTALLA

25 PROGRAMACION Private Sub CommandButton1_Click() Dim n1 As Integer Dim n2 As Integer Dim Resultado As Integer Dim Suma As Integer n1 = Val(TextBox1) n2 = Val(TextBox2) Suma = n1 + n2 If Suma < 0 Then Label1 = ("Por favor ingrese dos números que al sumarse den mas que 0") Else Resultado = Suma Mod 2 If Resultado = 1 Then Label1 = ("Impar") Else Label1 = ("Par") End If End Sub

26 DIAGRAMA 8. Ingresar un número cualquiera e informar si es positivo y par, positivo impar, negativo par o negativo impar. C N N > 0 RESULTADO = N MOD 2 RESULTADO = 1 PAR NO IMPAR F RESULTADO = N MOD 2 RESULTADO = 1 PARIMPAR SI NO SI

27 PANTALLA

28 PROGRAMACION Private Sub CommandButton1_Click() Dim n As Integer Dim resultado As Integer n = Val(TextBox1) resultado = n Mod 2 If n > 0 And resultado = 0 Then Label3 = ("es positivo par") Else If n > 0 And resultado = 0 Then Label3 = ("es positivo impar") Else If n < 0 And resultado = 1 Then Label3 = ("es negativo impar") Else If n < 0 And resultado = 1 Then Label3 = ("es negativo par") End If End Sub


Descargar ppt "Camila Rodríguez 1º B. DIAGRAMA: PANTALLA: PROGRAMACION Private Sub CommandButton1_Click() Dim NumeroA As Integer Label1 = "ingrese un numero" NumeroA."

Presentaciones similares


Anuncios Google