'determinar variable Dim a ! "on# Dim cont ! Inte#er 'co#er dato $ara variable a % &al(Te't1(Te't) '$roceo cont % ) *+ile a , ) a % a - 1) cont % cont . 1 *end "abel/(Ca$tion % 0tiene 0 1 cont 1 0 di#ito0 End Sub Private Sub Command/_Click() End End Sub P2OG2!3! S43!2 / N43E2O POSITI&OS Private Sub Command1_Click() 'Determinar variable Dim a ! "on# Dim b ! "on# 'Co#er dato $ara variable a % &al(Te't1(Te't) b % &al(Te't/(Te't) 'o$eracion I5 (a , ) !nd b , )) T+en "abel6(Ca$tion % 0el reultado e 0 1 a . b Ele 3#7o' (0El numero debe er $oitivo0) End I5 End Sub Private Sub Command/_Click() End End Sub Private Sub Command6_Click() Te't1 % Clear Te't/ % Clear "abel6 % Clear End Sub P2OG2!3! S43!2 / N43E2OS DECI3!"ES Private Sub alir_Click() End End Sub Private Sub umar_Click() Dim ! ! Double Dim 7 ! Double Dim C ! Double ! % Te't1(Te't 7 % Te't/(Te't C % ! . 7 3#7o' 0la uma e 0 1 C End Sub DESC4ENTO P2ECIO DE 3!DE2! dec % Pt 8 )()9 total % Pt : dec Te't;(Te't % total Ele Tm % 0c0 dec % Pt 8 )(1 total % Pt : dec Te't;(Te't % total End I5 End I5 Ele total % Pt Te't;(Te't % total End I5 End Sub Private Sub Command/_Click() Te't1(Te't % Clear Te't/(Te't % Clear Te't6(Te't % Clear Te't;(Te't % Clear End Sub Private Sub Command6_Click() End End Sub 2E&IS!2 C4!NTO P2I3OS <!= Private Sub Command1_Click() Dim n ! "on# Dim d ! "on# n % In$ut7o'(0in#rear dato0) cont$ % ) *+ile (n >, )) cont % ) ?or i % 1 To n Ste$ 1 I5 (n 3od i % )) T+en cont % cont . 1 End I5 Ne't i I5 (cont % /) T+en cont$ % cont$ . 1 End I5 n % In$ut7o'(0in#rear dato0) I5 n % ) T+en End I5 *end "abel1(Ca$tion % 0+a@ 0 1 cont$ 1 0 $rimo0 End Sub DI!S DE "! SE3!N! Private Sub Command1_Click() Select Cae Te't1(Te't Cae 1 "abel/(Ca$tion % 0"une0 Cae / "abel/(Ca$tion % 03arte0 Cae 6 "abel/(Ca$tion % 03iercole0 Cae ; "abel/(Ca$tion % 0Aueve0 Cae 9 "abel/(Ca$tion % 0&ierne0 Cae B "abel/(Ca$tion % 0Sabado0 Cae C "abel/(Ca$tion % 0Domin#o0 Cae Ele "abel/(Ca$tion % 0Error en dato in#reado0 End Select End Sub Private Sub Command/_Click() Te't1(Te't % Clear "abel/(Ca$tion % Clear End Sub Private Sub Command6_Click() End End Sub 3OST2!2 DIGITOS Private Sub Command1_Click() Dim n ! "on# Dim d ! "on# n % &al(Te't1(Te't) I5 n , ) T+en *+ile n , ) d % n 3od 1) 3#7o' (0di#ito e D0 1 d) "it1(!ddItem d n % n - 1) *end EleD 3#7o' (0error de dato0) End I5 End Sub Private Sub Command/_Click() End End Sub Private Sub Command6_Click() Te't1(Te't % Clear "it1(Clear End Sub C!"C4"!2 ?!CTO2I!"ES Private Sub Command1_Click() 'declaracion de variable Dim n ! Inte#er Dim d ! Inte#er 'introduccion de variable n % Te't1(Te't 'o$eracione I5 n , ) T+en d % 1 ?or i % 1 To n Ste$ 1 d % i 8 d Ne't "abel1(Ca$tion % d End I5 I5 (n > )) T+en "abel1(Ca$tion % 0error0 End I5 I5 (n % )) T+en "abel1(Ca$tion % 0 el 5actorial e 10 End I5 End Sub Private Sub Command/_Click() Te't1 % Clear "abel1 % Clear End Sub P2OG2!3! P!2! C!"C4"!2 NOT!S Private Sub Command1_Click() End End Sub Private Sub Command/_Click() Dim ! ! Inte#er ! % Te't1(Te't I5 (! ,% ) !nd ! >% 1))) T+en I5 ! > 91 T+en 3#7o' (02e$robado0) Ele 3#7o' (0!$robado0) End I5 Ele 3#7o' (0error0) End I5 End Sub S43! DE / N43E2OS ENTE2OS Private Sub cmdcerrar_Click() End End Sub Private Sub cmdumar_Click() 'declarar ti$o de variable Dim n1 ! "on# Dim n/ ! "on# 'co#er dato $ara variable n1 % &al(t'tn1(Te't) n/ % &al(t'tn/(Te't) reultado % n1 . n/ lblreultado(Ca$tion % 0El reultado e 0 1 reultado End Sub Private Sub Command1_Click() t'tn1 % Clear t'tn/ % Clear lblreultado % Clear End Sub P2OG2!3! &E2I?I!2 SI ES P!2 O I3P!2 Private Sub Command1_Click() 'declarar variable Dim n ! "on# Dim d ! "on# 'co#er dato $ara variable n % &al(Te't1(Te't) '$roceo I5 n >, ) T+en d % n 3od 1) Select Cae d Cae ) "abel/(Ca$tion % 0el numero e $ar0 Cae / "abel/(Ca$tion % 0el numero e $ar0 Cae ; "abel/(Ca$tion % 0el numero e $ar0 Cae B "abel/(Ca$tion % 0el numero e $ar0 Cae E "abel/(Ca$tion % 0el numero e $ar0 Cae Ele "abel/(Ca$tion % 0el numero e im$ar0 End Select Ele "abel/(Ca$tion % 0el numero e neutro0 End I5
End Sub Private Sub Command/_Click() Te't1(Te't % Clear "abel/(Ca$tion % Clear End Sub Private Sub Command6_Click() End End Sub P2OG2!3! &E2I?IC!2 SI ES P2I3O = 3OST2!2 E" SIG4IENTE P2I3O Private Sub Command1_Click() Dim n ! "on# n % &al(Te't1(Te't) '$roceo I5 n >, ) T+en cont % ) ?or i % 1 To n Ste$ 1 I5 (n 3od i % )) T+en cont % cont . 1 End I5 Ne't i I5 cont % / T+en band % ?ale $ % n . 1 *+ile band % ?ale cont % ) ?or i % 1 To $ Ste$ 1 I5 $ 3od i % ) T+en cont % cont . 1 End I5 Ne't i I5 cont % / T+en band % True Ele $ % $ . 1 End I5 *end "abel1(Ca$tion % $ Ele "abel1(Ca$tion % 0no tiene i#uiente $rimo0 End I5 Ele "abel1(Ca$tion % 0el numero e neutro0 End I5 End Sub P2OG!3! P!2! S43!2 9 N43E2OS Private Sub Command1_Click() Dim ! ! Inte#er Dim cont ! Inte#er Dim uma ! Inte#er cont % ) uma % ) *+ile (cont > 9) ! % In$ut7o'(0in#ree numero0) I5 ! , ) T+en uma % uma . ! cont % cont . 1 End I5 *end 3#7o' (0total0 1 uma) End Sub P2OG2!3! &E2I?IC!2 SI ES N43E2O ESPEAO Private Sub Command1_Click() 'declarar variable Dim n ! "on# Dim au' ! "on# 'co#er dato $ara variable n % &al(Te't1(Te't) F1 % n au' % ) *+ile n , ) d % n 3od 1) au' % au' 8 1) . d n % n - 1) *end I5 F1 % au' T+en "abel1(Ca$tion % 0El numero e e$eGo0 Ele "abel1(Ca$tion % 0El numero no e e$eGo0 End I5 End Sub Private Sub Command/_Click() "abel1(Ca$tion % Clear Te't1(Te't % Clear End Sub Private Sub Command6_Click() End End Sub &E2I?IC!2 SI ES N43E2O POSITI&O H NEG!TI&I O NE4T2O Private Sub Command1_Click() Dim ! ! "on# ! % &al(Te't1(Te't) I5 (! , )) T+en 3#7o' (0numero Poitivo 0) Ele I5 (! > )) T+en 3#7o' (0numero ne#ativo0) Ele I5 (! % )) T+en 3#7o' (0mumero neutro0) End I5 End I5 End I5 End Sub