The %(x: Int) method is utilized to return the remainder when the specified first int value is divided by the second int value.
Method Definition: (First_Int_Value).%(Second_Int_Value)
Return Type: It returns remainder when the specified first int value is divided by the second int value.
Example #1:
object GfG
{
def main(args : Array[String])
{
val result = ( 100 ). % ( 50 )
println(result)
}
}
|
Example #2:
object GfG
{
def main(args : Array[String])
{
val result = ( 100 ). % ( 40 )
println(result)
}
}
|