Nosotros

martes, 1 de noviembre de 2011

Ejercicios de Inicio

La informática es una disciplina muy practica. Es necesario estar al día, actualizándose, para mantener los conceptos bien frescos.
Para ser competente en esta área, como en cualquier otra, es necesario mucha practica. Por eso te dejo unos cuantos ejercicios de programación para que los desarrolles en visual basic.net.

Estos ejercicios pueden ser muy fáciles, pero haciéndolos adquiriras destreza para resolver problemas mayores.

Cuando terminado un ejercicio, sube el código como comentario para que todas podamos aprender de tus técnicas.



1. Que tipo de datos resulta más adecuado para representar cada uno de los conceptos siguientes :
a) El sueldo de un trabajador b) La edad de una persona c) El número de hijos d) El estado civil
e) El estado de caducado no de un producto f) El nº de teléfono g) La dirección


2. Escribir un programa que pida una cantidad en pesos y la convierta en dolares.


3. A partir del programa anterior escribir uno que pase de euros a pesos.

4. Para cada uno de los puntos siguientes escribir un programa que pida los datos necesarios y calcule el área y el perímetro de la figura indicada
a) Un cuadrado b) Un rectángulo c) Un triángulo d) Un círculo


5. Escribir un programa para calcular el importe de una venta en un supermercado. El usuario debe indicar el nombre del producto, el precio por unidad y el nº de unidades y el programa sacará por pantalla el nombre del producto, el nº de unidades vendidas y el precio total. Preste especial atención a qué tipo de datos resulta más adecuado para  representar cada cantidad.


6 Escribir un programa que calcule la nómina de un trabajador de la manera siguiente manera. El trabajador cobra un precio fijo por hora y se le retiene un 5% en concepto de IRPF. El programa debe pedir el nombre del trabajador, las horas trabajadas y el precio que cobra por hora. Como salida debe imprimir el sueldo bruto, la retención y el sueldo neto

Nota: ejercicios tomados de Multimania.es

20 comentarios:

  1. prof. acabo de leer lo que hay que hacer estare trabajando en esto.

    ResponderEliminar
  2. tambien acabe de leer y tambien estoy trabajando solo me faltan dos

    ResponderEliminar
  3. Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click




    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Dim euro As Integer = 0
    Dim euro2 As Integer = 0
    Dim peso As Double = 0
    Dim peso2 As Integer = 0
    Dim precio As Integer = 0


    precio = Val(txtprecioactual.Text)
    euro = Val(txtvaloreuro.Text)
    euro2 = Val(txtvaloreuro2.Text)
    peso = Val(txtvalorpeso.Text)
    peso2 = Val(txtvalorpeso2.Text)

    If euro > 0 Then
    txtvalorpeso.Text = euro * precio


    End If

    If peso2 > 0 Then
    txtvaloreuro2.Text = peso2 / precio
    End If










    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    Me.Close()
    End Sub

    Private Sub txtprecioactual_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtprecioactual.SelectedIndexChanged

    End Sub
    End Class

    ResponderEliminar
  4. el anterior aridelmy #19 4to informatica

    ResponderEliminar
  5. aridelmy # 19 4to informatica17 de noviembre de 2011, 9:00

    Public Class convertirdepesoadolar


    Private Sub btnconvertirlo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconvertirlo.Click


    Dim peso As Integer = 0
    Dim dolar As Integer = 0
    Dim peso2 As Integer = 0
    Dim dolar2 As Integer = 0
    Dim precio As Integer = 0



    precio = Val(txtprecioactual.Text)
    peso = Val(txtvalorpeso.Text)
    dolar = Val(txtvalordolar.Text)
    txtvalordolar.Text = peso * precio


    peso2 = Val(txtvalorpeso2.Text)
    dolar2 = Val(txtvalordolar2.Text)
    txtvalordolar2.Text = peso2 / precio


    End Sub

    Private Sub bntlimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntlimpiar.Click
    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub convertirdepesoadolar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Me.Close()




    End Sub
    End Class

    ResponderEliminar
  6. julia jimenez # 10 4to informatica17 de noviembre de 2011, 9:04

    Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click




    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Dim euro As Integer = 0
    Dim euro2 As Integer = 0
    Dim peso As Double = 0
    Dim peso2 As Integer = 0
    Dim precio As Integer = 0


    precio = Val(txtprecioactual.Text)
    euro = Val(txtvaloreuro.Text)
    euro2 = Val(txtvaloreuro2.Text)
    peso = Val(txtvalorpeso.Text)
    peso2 = Val(txtvalorpeso2.Text)

    If euro > 0 Then
    txtvalorpeso.Text = euro * precio


    End If

    If peso2 > 0 Then
    txtvaloreuro2.Text = peso2 / precio
    End If










    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    Me.Close()
    End Sub

    Private Sub txtprecioactual_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtprecioactual.SelectedIndexChanged

    End Sub
    End Class

    ResponderEliminar
  7. julia jimenez # 10 4to informatica17 de noviembre de 2011, 9:06

    Public Class convertirdepesoadolar


    Private Sub btnconvertirlo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconvertirlo.Click


    Dim peso As Integer = 0
    Dim dolar As Integer = 0
    Dim peso2 As Integer = 0
    Dim dolar2 As Integer = 0
    Dim precio As Integer = 0



    precio = Val(txtprecioactual.Text)
    peso = Val(txtvalorpeso.Text)
    dolar = Val(txtvalordolar.Text)
    txtvalordolar.Text = peso * precio


    peso2 = Val(txtvalorpeso2.Text)
    dolar2 = Val(txtvalordolar2.Text)
    txtvalordolar2.Text = peso2 / precio


    End Sub

    Private Sub bntlimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntlimpiar.Click
    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub convertirdepesoadolar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Me.Close()




    End Sub
    End Class

    ResponderEliminar
  8. elvany sofia galvez # 8 4to informatica17 de noviembre de 2011, 9:09

    Public Class convertirdepesoadolar


    Private Sub btnconvertirlo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconvertirlo.Click


    Dim peso As Integer = 0
    Dim dolar As Integer = 0
    Dim peso2 As Integer = 0
    Dim dolar2 As Integer = 0
    Dim precio As Integer = 0



    precio = Val(txtprecioactual.Text)
    peso = Val(txtvalorpeso.Text)
    dolar = Val(txtvalordolar.Text)
    txtvalordolar.Text = peso * precio


    peso2 = Val(txtvalorpeso2.Text)
    dolar2 = Val(txtvalordolar2.Text)
    txtvalordolar2.Text = peso2 / precio


    End Sub

    Private Sub bntlimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntlimpiar.Click
    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub convertirdepesoadolar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Me.Close()




    End Sub
    End Class

    ResponderEliminar
  9. elvany sofia galvez # 8 4to informatica17 de noviembre de 2011, 9:12

    Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click




    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Dim euro As Integer = 0
    Dim euro2 As Integer = 0
    Dim peso As Double = 0
    Dim peso2 As Integer = 0
    Dim precio As Integer = 0


    precio = Val(txtprecioactual.Text)
    euro = Val(txtvaloreuro.Text)
    euro2 = Val(txtvaloreuro2.Text)
    peso = Val(txtvalorpeso.Text)
    peso2 = Val(txtvalorpeso2.Text)

    If euro > 0 Then
    txtvalorpeso.Text = euro * precio


    End If

    If peso2 > 0 Then
    txtvaloreuro2.Text = peso2 / precio
    End If


    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    Me.Close()
    End Sub

    Private Sub txtprecioactual_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtprecioactual.SelectedIndexChanged

    End Sub
    End Class

    ResponderEliminar
  10. julia jimenez gomez # 10 4to informatica17 de noviembre de 2011, 9:15

    Public Class convertirdepesoadolar


    Private Sub btnconvertirlo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconvertirlo.Click


    Dim peso As Integer = 0
    Dim dolar As Integer = 0
    Dim peso2 As Integer = 0
    Dim dolar2 As Integer = 0
    Dim precio As Integer = 0



    precio = Val(txtprecioactual.Text)
    peso = Val(txtvalorpeso.Text)
    dolar = Val(txtvalordolar.Text)
    txtvalordolar.Text = peso * precio


    peso2 = Val(txtvalorpeso2.Text)
    dolar2 = Val(txtvalordolar2.Text)
    txtvalordolar2.Text = peso2 / precio


    End Sub

    Private Sub bntlimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntlimpiar.Click
    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub convertirdepesoadolar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Me.Close()




    End Sub
    End Class

    ResponderEliminar
  11. elvany sofia galvez sanchez # 8 4to informatica17 de noviembre de 2011, 9:19

    Public Class convertirdepesoadolar


    Private Sub btnconvertirlo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconvertirlo.Click


    Dim peso As Integer = 0
    Dim dolar As Integer = 0
    Dim peso2 As Integer = 0
    Dim dolar2 As Integer = 0
    Dim precio As Integer = 0



    precio = Val(txtprecioactual.Text)
    peso = Val(txtvalorpeso.Text)
    dolar = Val(txtvalordolar.Text)
    txtvalordolar.Text = peso * precio


    peso2 = Val(txtvalorpeso2.Text)
    dolar2 = Val(txtvalordolar2.Text)
    txtvalordolar2.Text = peso2 / precio


    End Sub

    Private Sub bntlimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntlimpiar.Click
    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub convertirdepesoadolar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Me.Close()




    End Sub
    End Class

    ResponderEliminar
  12. aridelmy Ramos Fernandez # 19 4to informatica17 de noviembre de 2011, 9:21

    Public Class convertirdepesoadolar


    Private Sub btnconvertirlo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconvertirlo.Click


    Dim peso As Integer = 0
    Dim dolar As Integer = 0
    Dim peso2 As Integer = 0
    Dim dolar2 As Integer = 0
    Dim precio As Integer = 0



    precio = Val(txtprecioactual.Text)
    peso = Val(txtvalorpeso.Text)
    dolar = Val(txtvalordolar.Text)
    txtvalordolar.Text = peso * precio


    peso2 = Val(txtvalorpeso2.Text)
    dolar2 = Val(txtvalordolar2.Text)
    txtvalordolar2.Text = peso2 / precio


    End Sub

    Private Sub bntlimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntlimpiar.Click
    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub convertirdepesoadolar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Me.Close()




    End Sub
    End Class

    ResponderEliminar
  13. elvany sofia galvez # 8 4to informatica17 de noviembre de 2011, 9:23

    Public Class convertirdepesoadolar


    Private Sub btnconvertirlo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnconvertirlo.Click


    Dim peso As Integer = 0
    Dim dolar As Integer = 0
    Dim peso2 As Integer = 0
    Dim dolar2 As Integer = 0
    Dim precio As Integer = 0



    precio = Val(txtprecioactual.Text)
    peso = Val(txtvalorpeso.Text)
    dolar = Val(txtvalordolar.Text)
    txtvalordolar.Text = peso * precio


    peso2 = Val(txtvalorpeso2.Text)
    dolar2 = Val(txtvalordolar2.Text)
    txtvalordolar2.Text = peso2 / precio


    End Sub

    Private Sub bntlimpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bntlimpiar.Click
    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub convertirdepesoadolar_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Me.Close()




    End Sub
    End Class

    ResponderEliminar
  14. trabajando en ello, en un rato subo los programas.(Bramdont #9 4to Informática)

    ResponderEliminar
  15. acabamos de leer estos ejercicios y estamos trabajando nadamas no falta 1 att:lisaura y karina 4to informatica

    ResponderEliminar
  16. elvany sofia galvez # 8 4to informatica22 de noviembre de 2011, 5:55

    Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click




    For Each C In Me.Controls

    If TypeOf (C) Is TextBox Then
    C.TEXT = Nothing
    End If
    Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

    Dim euro As Integer = 0
    Dim euro2 As Integer = 0
    Dim peso As Double = 0
    Dim peso2 As Integer = 0
    Dim precio As Integer = 0


    precio = Val(txtprecioactual.Text)
    euro = Val(txtvaloreuro.Text)
    euro2 = Val(txtvaloreuro2.Text)
    peso = Val(txtvalorpeso.Text)
    peso2 = Val(txtvalorpeso2.Text)

    If euro > 0 Then
    txtvalorpeso.Text = euro * precio


    End If

    If peso2 > 0 Then
    txtvaloreuro2.Text = peso2 / precio
    End If

    End Sub

    Private Sub Label4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label4.Click

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    Me.Close()
    End Sub

    Private Sub txtprecioactual_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtprecioactual.SelectedIndexChanged

    End Sub
    End Class

    ResponderEliminar
  17. en este momento Roxanna y Bramdont estan trabajando en la mejor manera de resolver dicho problemas en un momento subimos los programas

    ResponderEliminar
  18. Estos son los Programas Asignados Por Kelvin....

    http://www.mediafire.com/?37lfrqf437d1qpc


    De Yoendy Jose & Yordy Manuel
    #4 #7
    Curso: 4TO INFORMATICA

    ResponderEliminar
  19. ESTOS SON LOS PROGRAMAS ASIGNADO POR KELVIN....

    LINK DE DESCARGA
    http://www.mediafire.com/?m2f106q1znbjjxv

    DE ROXANNA #18 Y BRAMDONT #9
    CURSO 4TO DE INFORMATICA..

    ResponderEliminar