output should look like this

         *
        ***
       *****
      *******
     *********
      *******
       *****
        ***
         *

         and seond one 

         ***************
          ***************
         ***************
          ***************
         ***************



         Thank you guys in advance!

Here's a place to start. In particular look at the post I made. The code isn't exactly like you describe you want. But the principles are explained and the code is simple and easy to adapt.

the code is easy. But you have to develope the code and we are glad to clear the doubts and correct the program.

@soche123, your attitude stinks. We don't care if you NEED this badly. You have failed to do anything to help yourself. Guess what, if you're planning a career in programming being able to think for yourself is an absolute must.

You clearly do not understand the elements of simple logic and for loops. That in itself isn't a problem. It's tricky for first timers. What I suggested was to draw a flow chart to help you understand it, visualise it.

That should be your next step, specifically look at the flow chart for a nested for loop.

This question has already been answered. Start a new discussion instead.