
在MATLAB中建立一个脚本文件,并输入下述代码:
a = 10;
%while loop execution
while a < 20if a == 15% skip the iteration a = a + 1;continue;endfprintf('value of a: %d
', a);a = a + 1;
end
运行该文件,显示下述结果:
value of a: 10 value of a: 11 value of a: 12 value of a: 13 value of a: 14 value of a: 16 value of a: 17 value of a: 18 value of a: 19
上一篇:JAVA泛型