output should look like this

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

         and seond one 

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



         Thank you guys in advance!

Recommended Answers

All 12 Replies

Member Avatar for iamthwee

We don't do homework.

please I tried hard but I've failed to do so..

can't understand the logic.

Member Avatar for iamthwee

Try a flow chart.

what do you mean?

anyone?please I need this badly!

We don't do homework. What code do you have so far?

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.

I mean explain the places where you went wrong

Member Avatar for iamthwee

@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.

find out a way yourself and then we will clarify your doubts

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.