Mathematical Modeling and MATLAB MATLAB MATLAB 1 202138
Sign up to view full document!
SIGN UP
Mathematical Modeling and MATLAB 数学建模与MATLAB 主讲人:孙越 数学建模与MATLAB 第五讲:循环结构(1) 2021/3/8
例题 • 求解 1+2+3+4+ …… 100的和 sum=0; x=1; while x<=100 sum=sum+x; x=x+1; end fprintf('1+2+3+……+100=%d', sum); 数学建模与MATLAB 6
- Slides: 13