Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# modulo

int x = 10;
int y = 2;
if(x % y == 0){
    Console.WriteLine("X is divisible by y");
}
else
{
    Console.WriteLine("x is not divisible by y, " + x%y + " is left");
}
 
PREVIOUS NEXT
Tagged: #modulo
ADD COMMENT
Topic
Name
7+3 =