[PR]
×
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
プログラミング、3DCGとその他いろいろについて
[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。
(import (rnrs) (ironscheme clr)) (clr-static-call System.Console WriteLine (+ 1 1)) (clr-static-call System.Console ReadLine)
2です。
(import (rnrs) (ironscheme clr)) (clr-static-call System.Console WriteLine "(- 6 2) = {0}" (- 6 2)) (clr-static-call System.Console WriteLine "(* 6 2) = {0}" (* 6 2)) (clr-static-call System.Console WriteLine "(/ 6 2) = {0}" (/ 6 2)) (clr-static-call System.Console ReadLine)
(- 6 2) = 4 (* 6 2) = 12 (/ 6 2) = 3
(import (rnrs) (ironscheme clr)) (clr-static-call System.Console WriteLine "(/ 7 2) = {0}" (/ 7 2)) (clr-static-call System.Console ReadLine)この結果は
(/ 7 2) = 7/2
(import (rnrs r5rs (6)) (ironscheme clr)) (clr-static-call System.Console WriteLine "(quotient 7 2) = {0}" (quotient 7 2)) (clr-static-call System.Console WriteLine "(modulo 7 2) = {0}" (modulo 7 2)) (clr-static-call System.Console WriteLine "(modulo 7 -2) = {0}" (modulo 7 -2)) (clr-static-call System.Console WriteLine "(modulo -7 2) = {0}" (modulo -7 2)) (clr-static-call System.Console WriteLine "(modulo -7 -2) = {0}" (modulo -7 -2)) (clr-static-call System.Console WriteLine "(remainder 7 2) = {0}" (remainder 7 2)) (clr-static-call System.Console WriteLine "(remainder 7 -2) = {0}" (remainder 7 -2)) (clr-static-call System.Console WriteLine "(remainder -7 2) = {0}" (remainder -7 2)) (clr-static-call System.Console WriteLine "(remainder -7 -2) = {0}" (remainder -7 -2)) (clr-static-call System.Console ReadLine)
(quotient 7 2) = 3 (modulo 7 2) = 1 (modulo 7 -2) = -1 (modulo -7 2) = 1 (modulo -7 -2) = -1 (remainder 7 2) = 1 (remainder 7 -2) = 1 (remainder -7 2) = -1 (remainder -7 -2) = -1