Click here to Skip to main content
14,270,610 members
Rate this:
Please Sign up or sign in to vote.
See more:
Want code to print patterns in 2 to 4 loops......
patterns.. in c programming..


1
2 3
4 5 6
7 8
9


*
* *
* * *
* *
*
Posted
Comments
NotPolitcallyCorrect 11-Sep-13 6:34am
   
See your previous "question" about doing your own homework assignment.
CPallini 11-Sep-13 7:18am
   
That is a really easy task. If you are not able to code it yourself then study harder the C programming language.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

This really isn't difficult - just try it manually on a piece of paper, and work out what you have to do...then translate that to C. Start with the asterisks, because it's less to think about, and try to do just half the pattern:
*
**
***
When you have got that working, the rest should just fall into place.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100