By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 1,592 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

how to write this pattern code in c langauge?

P: n/a
1
2 3
4 5 6
7 8 9 10
11 12 13 14
Oct 3 '10 #1
Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,197
First, write a loop that cycles 14 times.

Second, inside that loop write another loop that a) prints your number and b) based on the cycle of the outer loop displays a \n.

You will need a loop counter in the outer loop that you can test inside the inner loop.
Oct 3 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.