Programa Select-Case
txtcod = ""
txtelec = ""
txtval = ""
txtcan = ""
txtimpm = ""
txtimpb = ""
txttotal = ""
pre = ""
pre2 = ""
txtcod.SetFocus
End Sub
Private Subcmd_salir_Click()
Unload Me
End Sub
Private Sub txtcan_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtimpm.Text = Val((txtcan.Text) * (txtval.Text)) * 7 / 100
txtimpb.Text = Val((txtcan.Text) *(txtval.Text)) * 5 / 100
txttotal.Text = Val(txtcan.Text * txtval.Text) + (Val(txtimpb.Text) + Val(txtimpm.Text))
cmd_limpiar.SetFocus
End If
End Sub
Private Sub txtcod_KeyPress(KeyAscii AsInteger)
Dim elec As String
elec = Val(txtcod.Text)
If KeyAscii = 13 Then
Select Case (elec)
Case 1
txtelec.Text = "Ha elejido Palco"
txtval.Text = 25
pre.Caption = "Ha elejido "
pre2.Caption ="Palco"
Case 2
txtelec.Text = "Ha elejido Tribuna"
txtval.Text = 20
pre.Caption = "Ha elejido "
pre2.Caption = "Tribuna"
Case 3
txtelec.Text = "Ha elejido Preferencia"
txtval.Text = 15pre.Caption = "Ha elejido "
pre2.Caption = "Preferencia"
Case 4
txtelec.Text = "Ha elejido General"
txtval.Text = 5
pre.Caption = "Ha elejido "
pre2.Caption = "Gerenal"
Case 5
txtelec.Text ="ERROR"
txtval.Text = 0
pre.Caption = "NO A ELEJIDO "
pre2.Caption = "NINGUNA OPCIÓN"
End Select
txtcan.SetFocus
End If
End Sub
#include <conio.h>
#include <stdio.h>
main()
{int a,c,d=0,e;
clrscr();
for(c=0;c<=80;c++)
{
gotoxy(c,1); printf("*");
gotoxy(c,24); printf("*");
}
c=3;
gotoxy( 3,2); printf("Ingrese que sera sumando el numero por si mismo:\t ");scanf("%d",&a);
do {
d=a+d;
gotoxy(3,c);printf("%d \t",d);printf("\t Desea terminar ingrese un numero mayor al que ingreso ariba:");scanf("%d",&e);
c=c+1;
}while (e<=a);gotoxy(20,20);printf("Gracias");
for ( c=0;c<=24;c++){
gotoxy(1,c);printf("*"); // los horizontales//
gotoxy(80,c);printf("*");}
getch();
}
#include <conio.h>
#include <stdio.h>...
Regístrate para leer el documento completo.