Arithmetic/Integer: Difference between revisions
Content added Content deleted
(added Go) |
No edit summary |
||
Line 814: | Line 814: | ||
Or 0!2 = 1</lang> |
Or 0!2 = 1</lang> |
||
=={{header|Objeck}}== |
|||
<lang objeck> |
|||
bundle Default { |
|||
class Arithmetic { |
|||
function : Main(args : System.String[]), Nil { |
|||
DoArithmetic(); |
|||
} |
|||
function : native : DoArithmetic(), Nil { |
|||
a := IO.Console->GetInstance()->ReadString()->ToInt(); |
|||
b := IO.Console->GetInstance()->ReadString()->ToInt(); |
|||
IO.Console->GetInstance()->Print("a+b = ")->PrintLine(a+b); |
|||
IO.Console->GetInstance()->Print("a-b = ")->PrintLine(a-b); |
|||
IO.Console->GetInstance()->Print("a*b = ")->PrintLine(a*b); |
|||
IO.Console->GetInstance()->Print("a/b = ")->PrintLine(a/b); |
|||
} |
|||
} |
|||
} |
|||
</lang> |
|||
=={{header|OCaml}}== |
=={{header|OCaml}}== |