Help us understand the problem. What is going on with this article?

いろいろな言語でFizzBuzzを書いてみた

FizzBuzzって何？

「３」で割り切れる数値を引数に渡すと、’Fizz'を返す。
「５」で割り切れる数値を引数に渡すと、’Buzz'と返す。
「３」、「５」の両方で割り切れる数値を引数に渡すと、'FizzBuzz'を返す。

Python version

```x = int(input("好きな数字を入力してください："))

print(x)
if x % 15 == 0:
print("FizzBuzz")
elif x % 3 == 0:
print("Fizz")
elif x % 5 == 0:
print("Buzz")
else:
print('？？？？')
```

Ruby version

```def fizz_buzz(number)
if number % 15 == 0
'FizzBuzz'
elsif number % 3 == 0
'Fizz'
elsif number % 5 == 0
'Buzz'
else
number.to_s
end
end

puts "1 以上の数字を入力してください"

input = gets.to_i

puts '結果は、、、'

puts fizz_buzz(input)

```

JavaScript

```<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<title>hello</title>
<body>
<script>
let aiueo = 2;
if (aiueo % 15 === 0){
document.write('FizzBuzz');
}else if (aiueo % 5 === 0){
document.write('Fizz');
}else if (aiueo % 3 === 0){
document.write('Buzz');
}else {
document.write('???');
}
</script>
</body>
</html>

```

※Javascriptは只今絶賛勉強中なので許してください。

終わりに

すごく難しかったです。
とりあえず今日は、まぶたの裏を見ながら、反省しようと思います。

yorosiku
Why not register and get more from Qiita?
1. We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
2. you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
1. We will deliver articles that match you
By following users and tags, you can catch up information on technical fields that you are interested in as a whole
2. you can read useful information later efficiently
By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした