Simple C++ challenge for the beginners

Default featured post

Last night, I had spare time so as usual I started doing programming with C++. I decided to combine two really simple star pyramid issues to make more complex issue to make little challenge for myself. Here is the following image that I wanted to make with out using any graphic libraries such as Ncurses or anything. The only available option is control keys like \n, \t.

At first it seemed to be so easy but it was not very easy as I thought. It is either reflects that my programming skill is becoming weak or I underestimate the problem. Anyway finally after around 45 minutes trial and error on paper and on the computer, I was able to write the code as much efficient as I code. I think it could be nice challenge for the beginners like me to make programming questions and then try to solve them. Maybe in the future I post more about programming challenge. I also recommend readers try to solve this question at first and then take a look at the source code.The code is uploaded in GitHub in order to allow others to add their new solutions there publicly and learn little bit about project team working. You can learn more about GitHub from this post. For accessing to the source code at GitHub click here please.