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

Rubyである文字列に特定の文字が含まれているかをチェックする処理

Posted at

Rubyであるある文字列に特定の文字が含まれているかをチェックする処理
のプログラムです

# 新規作成 2021/6/11 
# 作者  nogizakapython
puts '含まれる文字を入力してください'
N = gets.chomp

puts '文字列を入力してください'
S = gets.chomp

#文字列Sに文字Nが含まれているかチェックする処理
if S.include? N
    puts 'YES'
else
    puts 'NO'
end
1
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
1
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?