RosettaCodeData/Task/Loops-Foreach/MATLAB/loops-foreach-1.m

5 lines
139 B
Mathematica
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
list1 = [1,5,6,7,-7,-9];
for k = list1, % list1 must be a row vector (i.e. array of size 1xn)
printf('%i\n',k)
end;