GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 4.50 average.
  #1  
Old 28-Apr-2004, 06:52
Rebus Rebus is offline
New Member
 
Join Date: Apr 2004
Posts: 5
Rebus is on a distinguished road
Exclamation

[Program] Nested loops.. C++


I need to produce a patern like the one below in C++ using a nested loop.

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

Can someone help plz
  #2  
Old 12-May-2004, 02:40
aaroncohn's Avatar
aaroncohn aaroncohn is offline
Regular Member
 
Join Date: Feb 2004
Location: Bay Area, CA.
Posts: 564
aaroncohn is a jewel in the roughaaroncohn is a jewel in the roughaaroncohn is a jewel in the rough
Hey, what is this doing here? This shouldn't be in here! MOD! Move this thread! And you, Rebus... use some common sense, man!
__________________
-Aaron
  #3  
Old 12-May-2004, 02:46
Max Payne's Avatar
Max Payne Max Payne is offline
Regular Member
 
Join Date: Apr 2004
Location: 3° 08 North 101° 42 East
Posts: 332
Max Payne is a jewel in the roughMax Payne is a jewel in the roughMax Payne is a jewel in the rough
thats a nice one...I'm kind of confused..scrach my head..

BTW: thats really a hard problem to solve....I don't think I can program that!!
__________________
When you say "I wrote a program that crashed Windows," people just stare at you blankly and say "Hey, I got those with the system, for free." Linus Torvalds
  #4  
Old 12-May-2004, 07:33
Garth Farley Garth Farley is offline
Invalid Email Address
 
Join Date: May 2002
Location: Ireland
Posts: 638
Garth Farley is a jewel in the roughGarth Farley is a jewel in the roughGarth Farley is a jewel in the rough
Quote:
Originally Posted by aaroncohn
Hey, what is this doing here? This shouldn't be in here! MOD! Move this thread!
Sir Yessir!

Rebus, these forums are for helping others with their programming problems, not teaching elementary concepts. You come to us when you're stuck.

Google is a wonderful source of information. www.google.ie
GF
  #5  
Old 12-May-2004, 08:51
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
pretty asterisks! so pretty!
  #6  
Old 12-May-2004, 09:28
dabigmooish's Avatar
dabigmooish dabigmooish is offline
Member
 
Join Date: May 2004
Location: Baltimore (middle of Canton)
Posts: 165
dabigmooish will become famous soon enough
I'm not gonna hate on ya rebus. I remeber getting stuck on the little things
its real easy just use the following code:

CPP / C++ / C Code:
	for(int i = 1; i < 7; i++)
	{
		for(int a = 0; a < i; a++)
		{
			cout << "*";
		}
		cout << "\n";
	}


where 7 is one more then the total amount of asterix you want
Last edited by JdS : 12-May-2004 at 09:36. Reason: Please enclose C code in [c] & [/c] for syntax highlighting
  #7  
Old 12-May-2004, 11:11
aaroncohn's Avatar
aaroncohn aaroncohn is offline
Regular Member
 
Join Date: Feb 2004
Location: Bay Area, CA.
Posts: 564
aaroncohn is a jewel in the roughaaroncohn is a jewel in the roughaaroncohn is a jewel in the rough
I wrote a program for my CS1 class that draws a diamond of a user-specified width from asterisks : ) It took me awhile, but it does work! This program... I could do this one in my sleep.
__________________
-Aaron
  #8  
Old 12-May-2004, 13:05
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
nobody is hating on rebus. This forum is for helping with the problems, not doing them for you. He should have atleast tried to come up with something in order to get help. You can't just post problems and expect others to do them for you. And that applies to people who just post whole solutions to other peoples problems without first trying to help them find the solution themselves. How are people gonna learn if somebody else does all their work for them?
  #9  
Old 12-May-2004, 17:25
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light
Quote:
Originally Posted by machinated
nobody is hating on rebus. This forum is for helping with the problems, not doing them for you. He should have atleast tried to come up with something in order to get help. You can't just post problems and expect others to do them for you. And that applies to people who just post whole solutions to other peoples problems without first trying to help them find the solution themselves. How are people gonna learn if somebody else does all their work for them?

While I agree with what you are saying, I still am not a big fan of some of the posts on this thread. I think it is posts like this that prevent a new member from joining or asking questions. I don't have a problem laying down the guidelines, but I just would like to see a bit more of a welcoming attitude around here. We are definitely not here to do peoples homework or "gratis" consulting work.

And since dabigmooish was the only one to add anything constructive to this thread, I threw him some rep points.

Just rambling mostly, but I would hate to see this propagate much further than this.

Cheers,
d
  #10  
Old 12-May-2004, 17:27
machinated machinated is offline
Regular Member
 
Join Date: Mar 2004
Location: victoria, canada
Posts: 324
machinated has a spectacular aura aboutmachinated has a spectacular aura about
i dint mean for it to sound rude at all! maybe i shoulda added some smilies or something! :-)
 
 

Recent GIDBlogPython ebook by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with IF-ELSE conditional loops hellhammer C Programming Language 15 22-Apr-2004 20:15

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 02:41.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.