Descarga

Anuncio
EJERCICIO 2
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Dim e, d, i As Integer
e = TextBox1.Text
d = TextBox2.Text
If e <= 40 Then
i = e * 5
Else
i= (e * 5) + (d * 7)
End If
End Sub
EJERCICIO 3
Dim a, b, i, t As Integer
a = TextBox1.Text b
= TextBox2.Text
Select Case a
Case 1
TextBox3(" AMERICA DEL NORTE ")
TextBox4.Text = " 2 "
i = (b * 2) * 0.12
t = i + (b * 2)
Case 2
TextBox3 = " AMERICA CENTRAL "
TextBox4.Text = " 2,2 "
i = (b * 2.2) * 0.12
t = i + (b * 2.2)
Case 3
TextBox3 = " AMERICA DEL SUR "
TextBox4.Text = " 4,5 "
i = (b * 4.5) * 0.12
t = i + (b * 4.5)
Case 4
TextBox3 = " EUROPA "
TextBox4.Text = " 3,5 "
i = (b * 3.5) * 0.12
t = i + (b * 3.5)
Case 5
TextBox3 = " ASIA "
TextBox4.Text = " 6 " i
= (b * 6) * 0.12
t = i + (b * 6)
Case 6
TextBox3 = " AFRICA "
TextBox4.Text = " 6 "
i = (b * 6) * 0.12
t = i + (b * 6)
Case 7
TextBox3 = " OCEANIA "
TextBox4.Text = " 5 "
i = (b * 5) * 0.12
t = i + (b * 5)
End Select
EJERCICIO 4
Dim a As Integer
a = TextBox1.Text
If (a Mod 2 = 0) Then
TextBox2.Text = " PAR "
Else
TextBox2.Text = " IMPAR"
End If
End Sub
End Class
EJERCICIO 5
Dim a, b, c As Integer
a = TextBox1.Text
b = TextBox2.Text
c = TextBox3.Text
If a > b Then
If a > c Then
TextBox4.Text = a
If b > c Then
TextBox5.Text
TextBox6.Text
Else
TextBox5.Text
TextBox6.Text
= b
= c
= c
= b
End If
Else
TextBox4.Text = c
TextBox5.Text = a
TextBox6.Text = b
End If
Else
If b > c Then
TextBox4.Text = b
If b > c Then
TextBox5.Text
TextBox6.Text
Else
TextBox5.Text
TextBox6.Text
End If
Else
TextBox4.Text = c
TextBox5.Text = b
TextBox6.Text = a
End If
End If
= a
= c
= c
= a
Descargar