Converting for loop to while loop
1 回表示 (過去 30 日間)
古いコメントを表示
Dominic Garcia
2020 年 10 月 21 日
コメント済み: Dominic Garcia
2020 年 10 月 22 日

Need it as quick as possible Please, thanks
0 件のコメント
採用された回答
Asad (Mehrzad) Khoddam
2020 年 10 月 21 日
for i =1:5
j=1;
k=1;
while j<=5-i
fprintf(' ');
j = j+1;
end
while k<=i
fprintf('*');
k = k+1;
end
fprintf('\n')
end
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!