#C program help please
29 messages · Page 1 of 1 (latest)
You first want to break it up into "blocks"
An empty block (a space) and the asterisk block
Then try and find a pattern for when to place empty blocks and when to play asterisk blocks
Good luck!
Ok tnx, i ll try
hint you'll use two loops
Oh yeah, you don't need to place empty block on the right side of the triangle as well (although it might be easier)
Hmm, i am still trying
It hasn't been long. Keep trying and maybe ask for help if you're still stuck later
Guys i almost got it but is there any way that i can remove those extra asteriks
.
The required pyramid is in the pattern but i need a way to remove them
But that's why it's not correct
Well, you can't remove them. Think of it like this. How many spaces are there before each row? How many stars are there in a row? Do you see any pattern?
Yeah,But i am not able to do it
Hint: The number of spaces decrease as you go down the rows, and the number of stars increase as you down. Can you write a loop such that its number of iterations decreases after each iteration?
Maybe writing a table for the row number, number of space, and number of asterisks will help you figure out the pattern
Ok then i will try it out
It's not a difficult problem to solve but it might just take some time. You should be able to do it with the hints we've given as anything more would've been the answer itself lol
Guys thank you so much for your help i finally got it
I overthinked too much
Is this the one or any better way
Here's a chocolate for helping me finish my homework 🍫
Jeez indent your code
Ok!
use screenshots lol
Jeez use a formatter