how can i write a programs which prints the following pattern, but by only using nested loop

*
***
*****
*******
*****
***
*

1 Comment

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)

A = [' * ';...
' *** ';...
' ***** ';...
' *******';...
' ***** ';...
' *** ';...
' * '];
for ii = 1:1
for jj = 1:1
disp(A)
end
end

This question is closed.

Asked:

on 19 Apr 2016

Edited:

on 19 Apr 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!