Advertisement
Fawers

video game system fluxograma

Jul 16th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Criado por Fabs Werneck aka Fawers
  2. 'para a pΓ‘gina Press Start
  3. ' http://www.facebook.com/PressStaart/posts/486510994768506
  4. 'Copie e cole o cΓ³digo abaixo no bloco de notas e salve como algum_nome_aqui.vbs
  5.  
  6. Sub choose(choice)
  7.     system = ""
  8.     If choice = 1 Then
  9.         system = "a PC"
  10.     ElseIf choice = 2 Then
  11.         system = "a Wii"
  12.     ElseIf choice = 3 Then
  13.         system = "an XBox360"
  14.     ElseIf choice = 4 Then
  15.         system = "a PS3"
  16.     End If
  17.  
  18.     Call MsgBox("Buy " & system, vbInformation + vbOKOnly, "")
  19. End Sub
  20.  
  21. Sub init()
  22.     choice = videoGames()
  23.     choose(choice)
  24. End Sub
  25.  
  26. Function videoGames()
  27.     ans = MsgBox("Do you like video games?", vbYesNo)
  28.     If ans = vbYes Then
  29.         videoGames = 1
  30.     Else
  31.         videoGames = friends()
  32.     End If
  33. End Function
  34.  
  35. Function friends()
  36.     ans = MsgBox("Do you have any friends?", vbYesNo)
  37.     If ans = vbYes Then
  38.         friends = internetFriends()
  39.     Else
  40.         friends = 4
  41.     End If
  42. End Function
  43.  
  44. Function internetFriends()
  45.     ans = MsgBox("...from the Internet?", vbYesNo)
  46.     If ans = vbYes Then
  47.         internetFriends = 3
  48.     Else
  49.         internetFriends = 2
  50.     End If
  51. End Function
  52.  
  53. init()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement