I want to evaluate the first integer evenly divisible by 3 and 5 using a Matlab code. My attempt is the following:
while mod(n,5)~=0 && mod(n,3)~=0
I'm new to Matlab and wondering where the issue here is. The code returns n=3 for some reason. I also want to extend this to find the first number evenly divisible by 1-10, for which I wrote the following while loop which also did not return the expected value. Where is my error?