Programming Course in C# ¡Free!

Calculate remainder of division

 Sunday, May 31, 2015 published by Exercises C#
Course > Basic concepts > Calculate remainder of division
Write a program in c# to calculate the remainder of the division 20 / 10. To calculate the remainder of a division in c# the special character '%' is used.

Input

-

Output

0
using System;
class Program
{
    public static void Main(string[] args)
    {
        Console.WriteLine(20 % 10);
    }
}