RosettaCodeData/Task/Loops-Do-while/MATLAB/loops-do-while.m

7 lines
91 B
Matlab

a=0;
while (1)
a = a+1;
disp(a);
if (~mod(a,6)) break; end;
end;