Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- // Actividad 07 - Funciones matematicas
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- Dim azar As Integer
- Randomize()
- azar = Int(10 * Rnd()) + 1
- TextBox1.Text = azar
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Dim azar As Integer
- Dim rangomenor As Integer
- Dim rangomayor As Integer
- Randomize()
- rangomayor = CInt(TextBox2.Text)
- rangomenor = CInt(TextBox3.Text)
- azar = Int((rangomayor - rangomenor + 1) * Rnd()) + rangomenor
- TextBox4.Text = azar
- End Sub
- Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
- Dim numero As Integer
- Dim raiz As Integer
- raiz = CInt(TextBox5.Text)
- numero = CInt(TextBox6.Text)
- TextBox7.Text = numero ^ (1 / raiz)
- End Sub
- Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
- Dim numero As Integer
- Dim decimales As Integer
- numero = TextBox8.Text
- decimales = CInt(TextBox9.Text)
- TextBox10.Text = Math.Round(numero, decimales)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement