ä¾ãã°ï¼1ãã10ã¾ã§ã®æ´æ°ã®ç·åãè¨ç®ãã¦è¡¨ç¤ºããããã°ã©ã ã¯ï¼MyCè¨èªã§ã¯æ¬¡ã®ããã«æ¸ããï¼ãã以éï¼ãã®ããã°ã©ã ã¯sum.mycã¨ãããã¡ã¤ã«ã«ã»ã¼ãããã¦ãããã®ã¨ããï¼ã { zero = 0; minus_one = -1; sum = 0; n = 10; while (n > zero) { sum = sum + n; n = n + minus_one; }; print sum; } ãã®ããã°ã©ã ã¯ï¼åã
ã®è¡ãå
ã®æ§æã¨æ£ç¢ºã«å¯¾å¿ãã¦ãããã¨ã«æ°ãã¤ãã¦ã»ãããä¾ãã°ï¼ãzero = 0ãã¨ãn > zeroãã¯ï¼åã«ãn > 0ãã¨æ¸ãããã¨ããã ãï¼ä»åã®è¨èªã«ã¯å¤æ°ã¨å®æ°ãç´æ¥æ¯è¼ããæ§æããªãï¼!ï¼ã®ã§ï¼ãã®ãããªæ¸ãæ¹ã«ãªã£ã¦ãããminus_oneã«ã¤ãã¦ãåæ§ã ããã¡ããï¼ãã®ãããªå¶éã¯ããã¾ã§èª¬æãå®è£
ãç°¡åã«ããããã®ãææããã«éããªãã®ã§
{{#tags}}- {{label}}
{{/tags}}