<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hyoromo</author_name>
  <author_url>https://blog.hatena.ne.jp/hyoromo/</author_url>
  <blog_title>hyoromoのブログ</blog_title>
  <blog_url>https://hyoromo.hatenablog.com/</blog_url>
  <categories>
    <anon>Ruby1.8.7</anon>
  </categories>
  <description>先日購入した参考書より、数値に関する練習問題。(1)「華氏を求めよ」という問題。式は「華氏 = 摂氏 * 9 / 5 + 32」 def cels2fahr(cels) fahr = cels * 9 / 5 + 32 end p cels2fahr(ARGV[0].to_i) さすがにこれくらいはできる！と思いきや、小数点が考慮されていませんでした。 こちらが公式の解答 def cels2fahr(cels) return Float(cels) * 9 / 5 + 32 end (2)「(1)とは逆に摂氏を求めよ」という問題。 def fahr2cels (fahr) # 摂氏 = (華氏…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhyoromo.hatenablog.com%2Fentry%2F20081115%2F1226766734&quot; title=&quot;たのしいRuby 第10章 練習問題(P.180) - hyoromoのブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2008-11-15 01:32:14</published>
  <title>たのしいRuby 第10章 練習問題(P.180)</title>
  <type>rich</type>
  <url>https://hyoromo.hatenablog.com/entry/20081115/1226766734</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
