Advertisement
hufabio

costo albergo

Aug 19th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. Public Class Form1
  2. Dim opzA As Integer
  3. Dim opzB As Integer
  4. Dim opzC As Integer
  5. Dim risposta As String
  6. Dim continuare As String
  7. Dim nome As String
  8. Dim clienti As Integer
  9. Dim costo As Integer
  10.  
  11.  
  12.  
  13. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  14. opzA = 0
  15. opzB = 0
  16. opzC = 0
  17.  
  18. Do
  19. nome = InputBox("qual'è il suo nome")
  20. risposta = InputBox("quale pacchetto vuole?(a,b,c)")
  21. If risposta = "a" Then
  22. ListBox1.Items.Add(nome)
  23. opzA = opzA + 1
  24. End If
  25. If risposta = "b" Then
  26. ListBox2.Items.Add(nome)
  27. opzB = opzB + 1
  28. End If
  29. If risposta = "c" Then
  30. ListBox3.Items.Add(nome)
  31. opzC = opzC + 1
  32. End If
  33. continuare = InputBox("continuare?")
  34. Loop Until continuare = "no"
  35. End Sub
  36.  
  37. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  38. clienti = opzA + opzB + opzC
  39. costo = opzA * 55 + opzB * 85 + opzC * 135
  40. Label1.Text = (clienti)
  41. Label2.Text = (costo)
  42. End Sub
  43.  
  44. Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
  45. End
  46.  
  47. End Sub
  48. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement