Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
1.00/5 (5 votes)
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
[no name] 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

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900