When i compile (modulo 10.5 5) in scheme. It produces an error. In procedure modulo: Wrong type argument in position 2: 10.5.
How can i check this and the value if the number 10.5 is divisible by 5.
Thanks
When i compile (modulo 10.5 5) in scheme. It produces an error. In procedure modulo: Wrong type argument in position 2: 10.5.
How can i check this and the value if the number 10.5 is divisible by 5.
Thanks
modulo doesn't work with decimals because it only accepts integers. As discussed above, you can define another procedure to see if two numbers are divisible by each other. Otherwise, the computer doesn't know how to accept non-integer numbers for modulo.