8
6

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 3 years have passed since last update.

【Ruby】Ruby入門

Last updated at Posted at 2020-04-23

#【Ruby】Ruby入門

##実行

Hello.rb
print "Hello"
print "Hello!"
puts "Hello"
p "Hello!"
出力
HelloHello!Hello
"Hello!"

##条件分岐

Humidity.rb
hum = 70

if hum >= 60
    p hum.to_s + "%"
    p "ジメジメです"
elsif hum <= 60 && hum >= 40
    p hum
    p "快適です"
else hum <= 40
    p hum
    p "カラカラです" 
end
出力
"70%"
"ジメジメです"

##環境構築
windowsでVScodeRubyをインストールしました。

##参考文献
この記事は以下の情報を参考にして執筆しました。
キノコード / プログラミング学習動画のYouTuber

8
6
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
8
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?