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

Plz help me in solving this problem

P: 1
I have got this assignment....plz help me to do it in C++.

Write a program that uses for structures to print the following patterns separately, one below the other. Use for loops to generate the patterns. All asterisks(*) should be printed by a single statement of the form cout << '*' ; (this causes the asterisks to print side by side). Hint: The last two patterns require that each line begin with an appropriate number of blanks.

Pattern A

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

Pattern B

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

Pattern C

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

Pattern D

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

I will be thankful for your help.
Jun 5 '07 #1
Share this Question
Share on Google+
3 Replies


AdrianH
Expert 100+
P: 1,251
Well, you've got the question, now what sort of answer or partial answer do you have?

We don't do others HW, please read the Posting Guidelines at the top of the forum.


Adrian
Jun 6 '07 #2

ilikepython
Expert 100+
P: 844
I have got this assignment....plz help me to do it in C++.

Write a program that uses for structures to print the following patterns separately, one below the other. Use for loops to generate the patterns. All asterisks(*) should be printed by a single statement of the form cout << '*' ; (this causes the asterisks to print side by side). Hint: The last two patterns require that each line begin with an appropriate number of blanks.

Pattern A

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

Pattern B

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

Pattern C

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

Pattern D

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

I will be thankful for your help.
All of what Adrian said and don't forget to search around before you post. This thread may help you:
http://www.thescripts.com/forum/thread643795.html
Jun 6 '07 #3

Savage
Expert 100+
P: 1,764
All of what Adrian said and don't forget to search around before you post. This thread may help you:
http://www.thescripts.com/forum/thread643795.html
Oops,I almost forgot to update that article.

Tnx ilikepython..


Savage
Jun 6 '07 #4

Post your reply

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