New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fizzbuzz added #1
Conversation
fizzbuzz.rb
Outdated
@@ -0,0 +1,13 @@ | |||
(1..30).each do |i| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ユーザーからの入力を受け付けてその数値分だけループさせるように書き換えてみましょうか。
fizzbuzz.rb
Outdated
@@ -0,0 +1,13 @@ | |||
(1..30).each do |i| | |||
|
|||
if i%15==0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
演算子の両サイドには半角スペースを入れるのが慣習ですね。
その他の場所も同様です。
fizzbuzz.rb
Outdated
|
||
(1..num).each do |i| | ||
|
||
if i%15 == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
%
も演算子なので両サイドに半角スペースがあった方が良いですね!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.