0

i'm making a program, i need to know is there a command for "divisible"?
as in

if m is divisible by n

if not, is there a command like "if its a whole number"?
as in

if m is a whole number

of course i can work with either command,
the second command is basically just the first command:"if m is divisible by 1"
and the first command is basically just the second command:"if m/n is a whole number"

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by max.yevs
0

actually, i think i found it

m % n

gives the remainder,

thus if remainder is 0, its divisible...
please do correct me if i'm wrong, though

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.