How to use modulo to compute a remainder in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(17 % 4);

            Console.WriteLine(100 % 90);

            Console.WriteLine(25 % 5);
        }
    }
}

/*
run:

1
10
0

*/

 



answered Jan 23, 2017 by avibootz
...