2
2

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.

大文字、小文字、大文字小文字変換

Posted at

文字列の大文字、小文字、大文字・小文字反転プログラムをruby
で実装しました

# 文字列の大文字、小文字、反転
# 2023/6/22 Create

str = "Nogizaka46"
ans = ""

# 出力関数
def output(msg)
  puts msg
end

ans = str.downcase
output(ans)

ans = str.upcase
output(ans)

ans = str.swapcase
output(ans)

出力結果はこちらです

ans1.jpg

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?