Current location - Education and Training Encyclopedia - University ranking - College junior VB
College junior VB
The code to achieve these requirements is as follows:

Private subcommand 1_Click ()

price = Val(Text 1。 Text)

If the price & gt= 200 and the price & lt500, then the price = price * 0.97.

If the price & gt= 500 and the price & lt 1000, then the price = price * 0.95.

If the price & gt= 1000 and the price & lt2500, then the price = price * 0.92.

If the price & gt= 2500 and the price & lt5000, then the price = price * 0.9.

If price & gt= 5000, then price = price * 0.86.

Text 2. Text = Price

End joint