Problem 45368. Sky full of stars - 01
Draw a right triangle with asterisks of size n. For example, for n=5
'* '
'** '
'*** '
'**** '
'*****'the empty places should be space.
There can be four types: bottom left (bl), bottom right (br), top left (tr) , top right (tr). The above example is 'bl' type.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers26
Suggested Problems
-
Find common elements in matrix rows
2712 Solvers
-
The Hitchhiker's Guide to MATLAB
3396 Solvers
-
Find the sum of the elements in the "second" diagonal
1194 Solvers
-
Change the sign of even index entries of the reversed vector
627 Solvers
-
Find out the Gray Code for a Given Binary Number
116 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!