120k views
0 votes
Write a short java method, ismultiple, that takes two long values, n and m, and returns true if and only if n is a multiple of m, that is, n = mi for some integer i.

User Tdimeco
by
8.2k points

1 Answer

2 votes
public boolean ismultiple( long n, long n )
{
return( n % m == 0 );
}
User Mahdi Jokar
by
7.9k points