division decimal
Publicado por johnfarra (6 intervenciones) el 12/09/2008 17:22:35
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Text16.Text = Val(Text1.Text) - Val(Text2.Text)
Text17.Text = Val(Text16.Text) / 73.55
Text18.Text = (Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text)) / 5
Text19.Text = Val(Text3.Text) / 1000
Text20.Text = Val(Text3.Text) / Val(Text18.Text)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Text21.Text = Val(Text11.Text) / Val(Text9.Text)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Text22.Text = Val(Text20.Text) / Val(Text19.Text)
End Sub
End Class
por que me toma el valor entero de los numeros cuando algun valor da numero decimal solo me efectua la operacion con la parte entera ejemplo mi numero es 7.7872 y la operacion la realiza solo con 7 osea la parte entera
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Text16.Text = Val(Text1.Text) - Val(Text2.Text)
Text17.Text = Val(Text16.Text) / 73.55
Text18.Text = (Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text)) / 5
Text19.Text = Val(Text3.Text) / 1000
Text20.Text = Val(Text3.Text) / Val(Text18.Text)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Text21.Text = Val(Text11.Text) / Val(Text9.Text)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Text22.Text = Val(Text20.Text) / Val(Text19.Text)
End Sub
End Class
por que me toma el valor entero de los numeros cuando algun valor da numero decimal solo me efectua la operacion con la parte entera ejemplo mi numero es 7.7872 y la operacion la realiza solo con 7 osea la parte entera
Valora esta pregunta


0