rubyでズンドコゲッター
概要
paizaのrubyでズンドコゲッターやってみた。
実際
サンプルコード
require 'net/http'
require 'uri'
def zundoko
url = "http://ohijs0.paas.jp-e1.cloudn-service.com/zundoko"
uri = URI.parse(url)
res = Net::HTTP.get(uri)
return res.force_encoding("UTF-8")
end
i = 0
while true
z = zundoko
print z + " "
if z != "ドコ"
if i == 4
break
end
i = 0
else
i = i + 1
end
end
print "キ・ヨ・シ!"
require 'net/http'
require 'uri'
def zundoko
url = "http://ohijs0.paas.jp-e1.cloudn-service.com/zundoko"
uri = URI.parse(url)
res = Net::HTTP.get(uri)
return res.force_encoding("UTF-8")
end
i = 0
while true
z = zundoko
print z + " "
if z != "ドコ"
if i == 4
break
end
i = 0
else
i = i + 1
end
end
print "キ・ヨ・シ!"
Author And Source
この問題について(rubyでズンドコゲッター), 我々は、より多くの情報をここで見つけました https://qiita.com/ohisama@github/items/fc0e78f74b8402cae66a著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .