ãè¨ç®æ©ããã°ã©ã ã®æ§é ã¨è§£éãã® å³å½¢è¨èªã®ã¨ããã§ã¤ã¾ããã¦ããã®ã§ ããä¸åº¦é«éé¢æ°ã«å¯¾ããèªåã®ç解ã Rubyã使ã£ã¦æ´çãã¦ã¿ã ãé«éé¢æ°ãã¨ã¯ãã®å¼æ°ã¨ãã¦é¢æ°ãåã£ãã ãã®æ»ãå¤ã¨ãã¦é¢æ°ãè¿ãããããé¢æ°ã®ãã¨ã§ãã ä»3ã¤ã®æ°ã®åãå·®ãç©ãåãæ±ããã¡ã½ãããèãã def plus_abc(a, b, c) a + b + c end def minus_abc(a, b, c) a - b - c end def mul_abc(a, b, c) a * b * c end def div_abc(a, b, c) a / b / c unless b == 0 or c == 0 end plus_abc(1, 2, 3) # => 6 minus_abc(10, 5, 3) # => 2 mul_abc(4, 5, 6) # => 120 div_abc(1
{{#tags}}- {{label}}
{{/tags}}