VB程序设计 如果购物金额超出1万元,那么超出1万元的部分打九折,并将实际金额显示在屏幕上Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load Dim money As Double money =
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/29 01:26:40
VB程序设计 如果购物金额超出1万元,那么超出1万元的部分打九折,并将实际金额显示在屏幕上Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load Dim money As Double money =
VB程序设计 如果购物金额超出1万元,那么超出1万元的部分打九折,并将实际金额显示在屏幕上
Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load
Dim money As Double
money = TextBox1.Text
If money > 10000 Then money = 10000 + (money - 10000) * 0.9
TextBox2.Text = money
End Sub
End Class我是这么写的,但是这一行money = TextBox1.Text显示有错误,到底怎么改呢?
VB程序设计 如果购物金额超出1万元,那么超出1万元的部分打九折,并将实际金额显示在屏幕上Private Sub Form1_Load(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles MyBase.Load Dim money As Double money =
money = val(TextBox1.Text)