Guys I am having trouble coding this one :( Any help please?
Input
You are to ask the user to input from the console(keyboard) two data, M and N. M is an integer (M>0)that tells us the size of the pyramid and N is the character symbol you will use to draw the replica of the pyramid.
Sample Run
Input a number and a symbol: 4 *
*
* * * *
* * * * * * *
* * * * * * * * * *
Here is my partial code. But the problem is when the size of the pyramid is more than 10 there's a bug -_-
i dont think anyone would spend time to make a code example for this but if you come up with one which might have errors or algorithmic mistake or uncompleted. people would like to help you
actually your code is quite fine just add #include <windows.h> .to use system("pause"); u need to add it. then everything is good to go. if i didnt miss something.
well cant say for sure but the reason might be consoles width limit.
i suppose you are working on deitel&deitel c++ book. ignore if i m wrong. yeah it gives you great examples and homework to work on so you can learn it better. but dont spend so much time on one thing. pass to another if you understand the usage of loop