how can i write a programs which prints the following pattern, but by only using nested loop
Info
This question is closed. Reopen it to edit or answer.
Show older comments
*
***
*****
*******
*****
***
*
1 Comment
John D'Errico
on 19 Apr 2016
Edited: John D'Errico
on 19 Apr 2016
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.
Answers (1)
John D'Errico
on 19 Apr 2016
A = [' * ';...
' *** ';...
' ***** ';...
' *******';...
' ***** ';...
' *** ';...
' * '];
for ii = 1:1
for jj = 1:1
disp(A)
end
end
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!