0

How to come up with the shape?

Hey guys I’m new here. I had a home work and don’t know how to solve it. The question is to write a program that displays this shape: _ _ _ _ * _ _ _ * * _ _ * * * _ * * * * * * * * * I don’t know if that is clear but basically to form that right triangle there with the starts and space using nested loops Thanks,

19th Jan 2018, 5:43 AM
Xhulio Myftari
Xhulio Myftari - avatar
3 Antworten
+ 9
Hint Over how many rows and columns is the triangle to be drawn? (what is its height and width) How many spaces do we need for each row before will fill the remaining space with a * or you know, search code playground, but that's taking all the fun out of it, isn't it :)
19th Jan 2018, 5:52 AM
jay
jay - avatar
+ 8
What method/s have to tried to solve this problem?
19th Jan 2018, 5:47 AM
jay
jay - avatar
+ 3
hint: spaces are decreasing and stars are increasing with each next line , now do the work
19th Jan 2018, 5:48 AM
code learner
code learner - avatar