954,499 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Function for a pattern.

Im stuck on these functions. How does one start to write a function to print out a set of 4 different patterns? So far ive gotten to the point where im using
void PrintPattern(int pattenrsize, int patternnumber, char patterncharacter)

now im lost as to how I read in the size number of the pattern I want ( which is 1 of 4 different ones)

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

****
* *
* *
****
@
@@
@@@
@@@@

and the last one is a diagnal line from top right to bottem left.

ok any suggestions?

Etarr
Newbie Poster
1 post since Oct 2004
Reputation Points: 10
Solved Threads: 0
 

Have you considered a switch statement?

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You