Problem 45370. Sky full of stars - 03
draw the following pattern with asterisks. For example, for n=6
'************'
'***** *****'
'**** ****'
'*** ***'
'** **'
'* *'
'* *'
'** **'
'*** ***'
'**** ****'
'***** *****'
'************'
Solution Stats
Problem Comments
-
2 Comments
Alireza yarmohammadi
on 8 Jul 2021
Hi Asif tell my why this code wont work??
B=char(tril(ones(5),0)*42)
y=[flipud(B) B';B fliplr(B)]
Dyuman Joshi
on 8 Jul 2021
Compare unique elements in your solution with the ones in test suite
Solution Comments
Show commentsProblem Recent Solvers28
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
52510 Solvers
-
Is my wife right? Now with even more wrong husband
1339 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
13517 Solvers
-
Check that number is whole number
5166 Solvers
-
Replace every 3rd element in a vector with 4
263 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!