how can i write a programs which prints the following pattern, but by only using nested loop
信息
此问题已关闭。 请重新打开它进行编辑或回答。
显示 更早的评论
*
***
*****
*******
*****
***
*
1 个评论
John D'Errico
2016-4-19
编辑:John D'Errico
2016-4-19
MAKE AN EFFORT. We don't do your homework. If and when you actually have a question, then ask it. Show what you are doing, what is your problem, then ask a question.
回答(1 个)
John D'Errico
2016-4-19
A = [' * ';...
' *** ';...
' ***** ';...
' *******';...
' ***** ';...
' *** ';...
' * '];
for ii = 1:1
for jj = 1:1
disp(A)
end
end
0 个评论
此问题已关闭。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!