Alumnas: María Sol Pérez Fernández & María Agustina Macchi Año : 1ºB Fecha de entrega:

1 Alumnas: María Sol Pérez Fernández & María Agustina Mac...
Author: Herberto Siman
0 downloads 2 Views

1 Alumnas: María Sol Pérez Fernández & María Agustina Macchi Año : 1ºB Fecha de entrega:

2 C NÚMER O A NÚMER O A>5 NONO SI F Ejercicio 0

3 Pantalla 0

4 Private Sub CommandButton1_Click() Dim númeroA As Integer Label1 = "ingrese un número" númeroA = val(TextBox1) If númeroA > 5 Then Label3 = "si" Else Label3 = "no" End If End Sub

5 Ejercicio 1 C F núm. >0 núm.

6 Pantalla 1

7 Private Sub CommandButton1_Click() Dim numero1 As Integer numero1 = val(TexBox1) If numero1 = 0 Then Label4 = ("el número es nulo") Else If numero1 > o Then Label4 = ("El número es Positivo") Else Label4 = ("número es Negativo") End If End Sub

8 Ejercicio 2 Ingresar 4 números cualesquiera. Informar el total si todos son positivos. Si no, informar "ingrese números positivos solamente". F C A B C D A>0 AND B>0 AND C>0 AND D>0 A+B+C+ D “Ingrese números positivo solamente”

9 Pantalla 2 Ingrese los números Resultado

10 Private Sub Como_Click() Dim a, b, c, d As Integer a = val(TextBox1) b = val(TextBox2) c = val(TextBox3) d = val(TextBox4) If a > 0 And b > 0 And c > 0 And d > 0 Then Label3 = a + b + c + d Else Label3 = ("ingresar numeros positivos solamente") End If End Sub

11 Ejercicio 3 Ingresar dos números cualesquiera. Informar "ambos positivos", "ambos negativos", "primero positivo y segundo no" o "segundo positivo y primero no" C F B A A>0 B>0 A 12 Pantalla 3 Ingrese dos números { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_12.jpg", "name": "Pantalla 3 Ingrese dos números", "description": "Pantalla 3 Ingrese dos números", "width": "800" } 13 Private Sub Verificar_Click() If TextBox1 > 0 Then If TextBox2 > 0 Then Label1 = "Los dos números son positivos." End If If TextBox1 > 0 Then If TextBox2 < 0 Then Label1 = "El primer número es positivo pero el segundo no, es negativo." End If If TextBox1 < 0 Then If TextBox2 > 0 Then Label1 = "El primer número es negativo pero el segundo no, es positivo." End If If TextBox1 < 0 Then If TextBox2 < 0 Then Label1 = "Los dos números son negativos." End If End Sub { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_13.jpg", "name": "Private Sub Verificar_Click() If TextBox1 > 0 Then If TextBox2 > 0 Then Label1 = Los dos números son positivos. End If If TextBox1 > 0 Then If TextBox2 < 0 Then Label1 = El primer número es positivo pero el segundo no, es negativo. End If If TextBox1 < 0 Then If TextBox2 > 0 Then Label1 = El primer número es negativo pero el segundo no, es positivo. End If If TextBox1 < 0 Then If TextBox2 < 0 Then Label1 = Los dos números son negativos. End If End Sub", "description": "Private Sub Verificar_Click() If TextBox1 > 0 Then If TextBox2 > 0 Then Label1 = Los dos números son positivos. End If If TextBox1 > 0 Then If TextBox2 < 0 Then Label1 = El primer número es positivo pero el segundo no, es negativo. End If If TextBox1 < 0 Then If TextBox2 > 0 Then Label1 = El primer número es negativo pero el segundo no, es positivo. End If If TextBox1 < 0 Then If TextBox2 < 0 Then Label1 = Los dos números son negativos. End If End Sub", "width": "800" } 14 Ejercicio 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 A B A>BA 15 Pantalla 4 Ingrese dos números { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_15.jpg", "name": "Pantalla 4 Ingrese dos números", "description": "Pantalla 4 Ingrese dos números", "width": "800" } 16 Private Sub Verificar_Click() If TextBox1 > TextBox2 Then Label1 = "El primer número es mayor que el segundo." End If If TextBox1 < TextBox2 Then Label1 = "El primer número es menor que el segundo." End If If TextBox1 = TextBox2 Then Label1 = "Los números son iguales" End If End Sub { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_16.jpg", "name": "Private Sub Verificar_Click() If TextBox1 > TextBox2 Then Label1 = El primer número es mayor que el segundo. End If If TextBox1 < TextBox2 Then Label1 = El primer número es menor que el segundo. End If If TextBox1 = TextBox2 Then Label1 = Los números son iguales End If End Sub", "description": "Private Sub Verificar_Click() If TextBox1 > TextBox2 Then Label1 = El primer número es mayor que el segundo. End If If TextBox1 < TextBox2 Then Label1 = El primer número es menor que el segundo. End If If TextBox1 = TextBox2 Then Label1 = Los números son iguales End If End Sub", "width": "800" } 17 Ejercicio 5 Ingresar cuatro números cualesquiera, si su suma es mayor a 15 elevarlo al cuadrado, si no, elevarlo al cubo. C A B C D (A+B+C +D) = x menor a15 (A+B+C+D) 2 (A+B+C +D) = 15 (A+B+C+D) 3 { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_17.jpg", "name": "Ejercicio 5 Ingresar cuatro números cualesquiera, si su suma es mayor a 15 elevarlo al cuadrado, si no, elevarlo al cubo.", "description": "C A B C D (A+B+C +D) = x menor a15 (A+B+C+D) 2 (A+B+C +D) = 15 (A+B+C+D) 3.", "width": "800" } 18 Pantalla 5 Ingrese los números Resultado { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_18.jpg", "name": "Pantalla 5 Ingrese los números Resultado", "description": "Pantalla 5 Ingrese los números Resultado", "width": "800" } 19 Private Sub BORRAR_Click() Label1 = "" TextBox3 = "" TextBox4 = "" TextBox5 = "" TextBox6 = "" End Sub Private Sub CommandButton1_Click() End Sub Private Sub Como_Click() a = val(TextBox3) + val(TextBox4) + val(TextBox5) + val(TextBox6) If a > 15 Then Label1 = val(a) ^ 2 End If If a < 15 Then Label1 = val(a) ^ 3 End If End Sub { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_19.jpg", "name": "Private Sub BORRAR_Click() Label1 = TextBox3 = TextBox4 = TextBox5 = TextBox6 = End Sub Private Sub CommandButton1_Click() End Sub Private Sub Como_Click() a = val(TextBox3) + val(TextBox4) + val(TextBox5) + val(TextBox6) If a > 15 Then Label1 = val(a) ^ 2 End If If a < 15 Then Label1 = val(a) ^ 3 End If End Sub", "description": "Private Sub BORRAR_Click() Label1 = TextBox3 = TextBox4 = TextBox5 = TextBox6 = End Sub Private Sub CommandButton1_Click() End Sub Private Sub Como_Click() a = val(TextBox3) + val(TextBox4) + val(TextBox5) + val(TextBox6) If a > 15 Then Label1 = val(a) ^ 2 End If If a < 15 Then Label1 = val(a) ^ 3 End If End Sub", "width": "800" } 20 Ejercicio 6 Ingresar un número cualquiera e informar si es par o impar C F A /2 A A NÚMERO ENTERO A NO ES /2 Número Par Número Impar { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_20.jpg", "name": "Ejercicio 6 Ingresar un número cualquiera e informar si es par o impar C F A /2 A A NÚMERO ENTERO A NO ES /2 Número Par Número Impar", "description": "Ejercicio 6 Ingresar un número cualquiera e informar si es par o impar C F A /2 A A NÚMERO ENTERO A NO ES /2 Número Par Número Impar", "width": "800" } 21 Pantalla 6 Ingrese un número { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_21.jpg", "name": "Pantalla 6 Ingrese un número", "description": "Pantalla 6 Ingrese un número", "width": "800" } 22 Private Sub CommandButton1_Click() If CInt(TextBox1.Text) Mod 2 = 0 Then Label1.Caption = "Es par" Else Label1.Caption = "Es impar" End If End Sub { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_22.jpg", "name": "Private Sub CommandButton1_Click() If CInt(TextBox1.Text) Mod 2 = 0 Then Label1.Caption = Es par Else Label1.Caption = Es impar End If End Sub", "description": "Private Sub CommandButton1_Click() If CInt(TextBox1.Text) Mod 2 = 0 Then Label1.Caption = Es par Else Label1.Caption = Es impar End If End Sub", "width": "800" } 23 Ejercicio 7 Ingresar dos números, sumarlos e informar si la suma da por resultado un número par o impar. C A B A Y B N ÚMEROS ENTEROS (A+B)= /2 (A+B)= NO ES/2 Número Par Número Impar F { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_23.jpg", "name": "Ejercicio 7 Ingresar dos números, sumarlos e informar si la suma da por resultado un número par o impar.", "description": "C A B A Y B N ÚMEROS ENTEROS (A+B)= /2 (A+B)= NO ES/2 Número Par Número Impar F.", "width": "800" } 24 Pantalla 7 Ingrese dos números { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_24.jpg", "name": "Pantalla 7 Ingrese dos números", "description": "Pantalla 7 Ingrese dos números", "width": "800" } 25 Private Sub CommandButton1_Click() If CInt(Label2) / 2 Then Label1 = "Es par" Else Label1 = "Es impar" End If End Sub Private Sub CommandButton2_Click() Label2 = val(TextBox1) + val(TextBox2) End Sub { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_25.jpg", "name": "Private Sub CommandButton1_Click() If CInt(Label2) / 2 Then Label1 = Es par Else Label1 = Es impar End If End Sub Private Sub CommandButton2_Click() Label2 = val(TextBox1) + val(TextBox2) End Sub", "description": "Private Sub CommandButton1_Click() If CInt(Label2) / 2 Then Label1 = Es par Else Label1 = Es impar End If End Sub Private Sub CommandButton2_Click() Label2 = val(TextBox1) + val(TextBox2) End Sub", "width": "800" } 26 Ejercicio 8 Ingresar un número cualquiera e informar si es positivo y par, positivo impar, negativo par o negativo impar. C A Nº POSITIVO Nº NEGATIVO PAR IMPAR PAR F { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_26.jpg", "name": "Ejercicio 8 Ingresar un número cualquiera e informar si es positivo y par, positivo impar, negativo par o negativo impar.", "description": "C A Nº POSITIVO Nº NEGATIVO PAR IMPAR PAR F.", "width": "800" } 27 Pantalla 8 { "@context": "http://schema.org", "@type": "ImageObject", "contentUrl": "http://images.slideplayer.es/9/1451281/slides/slide_27.jpg", "name": "Pantalla 8", "description": "Pantalla 8", "width": "800" } 28 Private Sub CommandButton1_Click() Dim b As Integer b = TextBox1 If b > 0 And b / 2 Then Label1 = ("el numero es negativo y par") Else If b > 0 And b Mod 2 0 Then Label1 = ("el numero es negativo y impar") If b < 0 And b / 2 Then Label1 = ("el numero es positivo y par") Else If b 0 Then Label1 = ("el numero es positivo y impar") End If End Sub

12 Pantalla 3 Ingrese dos números

13 Private Sub Verificar_Click() If TextBox1 > 0 Then If TextBox2 > 0 Then Label1 = "Los dos números son positivos." End If If TextBox1 > 0 Then If TextBox2 < 0 Then Label1 = "El primer número es positivo pero el segundo no, es negativo." End If If TextBox1 < 0 Then If TextBox2 > 0 Then Label1 = "El primer número es negativo pero el segundo no, es positivo." End If If TextBox1 < 0 Then If TextBox2 < 0 Then Label1 = "Los dos números son negativos." End If End Sub

14 Ejercicio 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 A B A>BA

15 Pantalla 4 Ingrese dos números

16 Private Sub Verificar_Click() If TextBox1 > TextBox2 Then Label1 = "El primer número es mayor que el segundo." End If If TextBox1 < TextBox2 Then Label1 = "El primer número es menor que el segundo." End If If TextBox1 = TextBox2 Then Label1 = "Los números son iguales" End If End Sub

17 Ejercicio 5 Ingresar cuatro números cualesquiera, si su suma es mayor a 15 elevarlo al cuadrado, si no, elevarlo al cubo. C A B C D (A+B+C +D) = x menor a15 (A+B+C+D) 2 (A+B+C +D) = 15 (A+B+C+D) 3

18 Pantalla 5 Ingrese los números Resultado

19 Private Sub BORRAR_Click() Label1 = "" TextBox3 = "" TextBox4 = "" TextBox5 = "" TextBox6 = "" End Sub Private Sub CommandButton1_Click() End Sub Private Sub Como_Click() a = val(TextBox3) + val(TextBox4) + val(TextBox5) + val(TextBox6) If a > 15 Then Label1 = val(a) ^ 2 End If If a < 15 Then Label1 = val(a) ^ 3 End If End Sub

20 Ejercicio 6 Ingresar un número cualquiera e informar si es par o impar C F A /2 A A NÚMERO ENTERO A NO ES /2 Número Par Número Impar

21 Pantalla 6 Ingrese un número

22 Private Sub CommandButton1_Click() If CInt(TextBox1.Text) Mod 2 = 0 Then Label1.Caption = "Es par" Else Label1.Caption = "Es impar" End If End Sub

23 Ejercicio 7 Ingresar dos números, sumarlos e informar si la suma da por resultado un número par o impar. C A B A Y B N ÚMEROS ENTEROS (A+B)= /2 (A+B)= NO ES/2 Número Par Número Impar F

24 Pantalla 7 Ingrese dos números

25 Private Sub CommandButton1_Click() If CInt(Label2) / 2 Then Label1 = "Es par" Else Label1 = "Es impar" End If End Sub Private Sub CommandButton2_Click() Label2 = val(TextBox1) + val(TextBox2) End Sub

26 Ejercicio 8 Ingresar un número cualquiera e informar si es positivo y par, positivo impar, negativo par o negativo impar. C A Nº POSITIVO Nº NEGATIVO PAR IMPAR PAR F

27 Pantalla 8

28 Private Sub CommandButton1_Click() Dim b As Integer b = TextBox1 If b > 0 And b / 2 Then Label1 = ("el numero es negativo y par") Else If b > 0 And b Mod 2 0 Then Label1 = ("el numero es negativo y impar") If b < 0 And b / 2 Then Label1 = ("el numero es positivo y par") Else If b 0 Then Label1 = ("el numero es positivo y impar") End If End Sub