Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
hi i cant programming
---*
--***
-*****
--***
---*

&
------*
----*---*
---*-----*
----*---*
------*

- : "space"
Posted
Comments
Sandeep Mewara 19-Nov-10 8:07am    
What have you tried?
Richard MacCutchan 19-Nov-10 11:09am    
Hint: Look at your question and try counting ... counting what? you ask ... well that's the challenge of programming.
Tarun.K.S 20-Nov-10 12:39pm    
well these links might help you: http://www.gidforums.com/t-9566.html, http://www.dreamincode.net/forums/topic/192631-star-patterns-in-c/

What are you talking about ?? :confused:
What is your problem exactly ?
 
Share this answer
 
Comments
Tarun.K.S 19-Nov-10 6:21am    
He wants to create those star patterns in C++.
You know, it's just a couple of printf!
:)
 
Share this answer
 
Comments
Tarun.K.S 20-Nov-10 5:22am    
My reason for vote of 1:
It requires the use of multiple for loops.
CPallini 20-Nov-10 5:31am    
You are apparently wrong ( for instance printf("---*\n--***\n-*****\n--***\n---*\n"); ). I suppose they should revoke your right to vote... :-)
Tarun.K.S 20-Nov-10 12:12pm    
With all due respect sir, why would someone use "printf" to print when it can be done using one or two for loops. Suppose the pattern has 9 rows of stars and 6 columns of star, will you keep on writing printf for each row?
Tarun.K.S 20-Nov-10 12:37pm    
if one starts to search in google about "star patterns in c", you can see the results. They use for loops.
Check this out: http://www.gidforums.com/t-9566.html
CPallini 20-Nov-10 12:59pm    
With all the respect, sir, 'it requires' means 'you can't do without' and that makes your sentence apparently WRONG.

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