Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.