Sha256: 0c349e9594dd95d710259e5f0c918925482d2c658f1f1b3d2a0cf13de75b5421
Contents?: true
Size: 598 Bytes
Versions: 10
Compression:
Stored size: 598 Bytes
Contents
using System; class Program { static void Main(string[] args) { int a = Convert.ToInt32(args[0]); int b = Convert.ToInt32(args[1]); Console.WriteLine("{0} + {1} = {2}", a, b, a + b); Console.WriteLine("{0} - {1} = {2}", a, b, a - b); Console.WriteLine("{0} * {1} = {2}", a, b, a * b); Console.WriteLine("{0} / {1} = {2}", a, b, a / b); // truncates towards 0 Console.WriteLine("{0} % {1} = {2}", a, b, a % b); // matches sign of first operand Console.WriteLine("{0} to the power of {1} = {2}", a, b, Math.Pow(a, b)); } }
Version data entries
10 entries across 7 versions & 1 rubygems