Skip to content

Instantly share code, notes, and snippets.

@SojiroNishimura
Created June 19, 2016 14:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save SojiroNishimura/f7f5e91b1a7a0160f2e5f7894f38e61d to your computer and use it in GitHub Desktop.
PlantUMLの旧記法でFizzBuzz
@startuml
(*) --> "ループ開始(1100)"
if "i <= 100" as judge then
[true] if "i % 3 == 0\n && i % 5 == 0" then
-right-> [true] FizzBuzz
--> judge
else
[false] if "i % 3 == 0" then
-right-> [true] Fizz
--> judge
else
[false] if "i % 5 == 0" then
-right-> [true] Buzz
--> judge
else
--> [false] print : i
--> judge
endif
else
judge -left-> [false] ループ終了
-left-> (*)
@enduml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment