Please help me in( Pyramid star pattern) code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please help me in( Pyramid star pattern) code

Tuple

5th Jul 2022, 8:45 PM
ANANIYA FEKEDE
ANANIYA FEKEDE - avatar
1 Answer
+ 3
Hi! If you want to code, start picking a program language. However. You vill need a loop and on evey loop a contatenation of a string with spaces and one with stars get together and is printed out. For a pyramid with n rows, the top row consists of a string with n-1 spaces and 1 star. Next row n-2 spaces and 2 stars and so on. The last row is just n stars to be printed out. If you get stucked, append your code for more help.
5th Jul 2022, 10:05 PM
Per Bratthammar
Per Bratthammar - avatar