0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

多言語FizzBuzzチャレンジ13日目:Julia

Last updated at Posted at 2022-12-12

これまでのまとめ

本日のお品書き

Juliaです。
Python絡みでJupyter Notebookを使っている時に、代替手段としてよく見かける名前ですね。

FizzBuzz

for i in 1:100
    if i % 15 == 0
        println("FizzBuzz")
    elseif i % 3 == 0
        println("Fizz")
    elseif i % 5 == 0
        println("Buzz")
    else
        println(i)
    end
end

個人的な印象としては、かなりPythonに近い書きっぷりです(少なくともFizzBuzz程度のレベル感であれば)

おまけ

ローカルにインストールしたくなかったのでDockerを使いました。docker pull juliaで最新のイメージをゲット。fizzbuzz.jlとして保存したスクリプトを実行すればOK。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?