Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Class Form1
- Dim opzA As Integer
- Dim opzB As Integer
- Dim opzC As Integer
- Dim risposta As String
- Dim continuare As String
- Dim nome As String
- Dim clienti As Integer
- Dim costo As Integer
- Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
- opzA = 0
- opzB = 0
- opzC = 0
- Do
- nome = InputBox("qual'è il suo nome")
- risposta = InputBox("quale pacchetto vuole?(a,b,c)")
- If risposta = "a" Then
- ListBox1.Items.Add(nome)
- opzA = opzA + 1
- End If
- If risposta = "b" Then
- ListBox2.Items.Add(nome)
- opzB = opzB + 1
- End If
- If risposta = "c" Then
- ListBox3.Items.Add(nome)
- opzC = opzC + 1
- End If
- continuare = InputBox("continuare?")
- Loop Until continuare = "no"
- End Sub
- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
- clienti = opzA + opzB + opzC
- costo = opzA * 55 + opzB * 85 + opzC * 135
- Label1.Text = (clienti)
- Label2.Text = (costo)
- End Sub
- Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
- End
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement