Social Icons

-*-*-Programacion-*-*-


pseint


-Suma de 3 Numeros

      a<-0;
b<-0;
c<-0;
escribir "Ingrese un numero";
leer a;
    Escribir "ingrese un numero";
leer b;
Escribir "ingrese un numero";
leer c;
escribir "la suma de los numeros ingresados es:";
d<-(a-b)+c;
escribir d;



-Ecuaciones Simples
Proceso sin_titulo
a<-0;
b<-0;
c<-0;
escribir "Ingrese un numero";
leer a;
    Escribir "ingrese un numero";
leer b;
Escribir "ingrese un numero";
leer c;
escribir "El resultado es:";
d<-(b*c)/a;
escribir d;
FinProceso



-Limpiar Pantalla
Proceso Pantalla_Limpia
a<-"";
b<-"";
c<-"";
Escribir "ingrese su nombre";
leer a;
esperar tecla;
Limpiar Pantalla;
Escribir "ingrese su apellido";
leer b;
limpiar pantalla;
escribir "presione una tecla para salir";


FinProceso
-Nombre completo y fecha de nacimiento
Proceso ejercicio
nombre<-"";
nombre2<-"";
apellido<-"";
f<-0;
escribir "ingrese su 1er nombre";
leer nombre;
escribir "ingrese su 2do nombre";
leer nombre2;
escribir "ingrese su apellido";
leer apellido;
escribir "ingrese su fecha de nacimiento";
leer f;
escribir "Hola","",nombre,"",nombre2,"",apellido,"", "nacistes el:",f;
FinProceso


Visual Basic 2010


  • Bienvenida a Visual 

    Public Class Form1

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            MsgBox("Hola Bienvenidos a Visual Basic 2010")
        End Sub

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

    End Class


  • Muestra Nombre

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Lbl_2.Text = ""
        TextBox1.Text = ""
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Lbl_2.Text = "Hola " & UCase(TextBox1.Text)
    End Sub
End Class 


  • Positivo/Negativo & Par/Impar


Public Class Form1
    Dim Numero As Integer
    Dim Numero2 As Integer
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Numero = Val(Txt_Numero.Text)
        Numero2 = Val(Txt_Numero.Text)
        If Numero <= -1 Then
            Lbl_PoN.Text = "Negativo"
        End If

        If Numero >= 1 Then
            Lbl_PoN.Text = "Positivo"
        End If

        If Numero = 0 Then
            Lbl_PoN.Text = "Neutro"
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        If (Numero2 / 2 = 0) Then
            Lbl_PoI.Text = "Par"
        End If
        If (Numero2 / 1 = 1) Then
            Lbl_PoI.Text = "Impar"
        End If

    End Sub
End Class


  • Sacar el IVA


Public Class Form1
    Dim nombre As Integer
    Dim codigo As Integer
    Dim precio As String
    Dim cantidad As String
    Dim pagar As String


    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Lbl_Pagar.Text = Txt_Precio.Text * Txt_Cantidad.Text
        Lbl_SinIva.Text = Lbl_Pagar.Text / 1.12
        Lbl_IVA.Text = Lbl_Pagar.Text * 0.12

    End Sub
  Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Txt_Nombre.Text = ""
        Txt_Codigo.Text = ""
        Txt_Precio.Text = ""
        Txt_Cantidad.Text = ""
        Lbl_Pagar.Text = ""
        Lbl_SinIva.Text = ""











No hay comentarios:

Publicar un comentario