Re: Nested for loop
- From: jt <jt_printer_guy@xxxxxxxxxxxxxx>
- Date: Mon, 09 Apr 2007 22:29:23 GMT
Alex Hunsley wrote:
f2prateek wrote:Yipppeeee... I got it...I want my output to be something like this using only a single nested
for loop:-
*
**
***
****
*****
****
***
**
*
But I have not been able to do it using only one nested loop. I have
done it with two nested for loops, but need help in using only a
single for loop. Any suggestions?
If you could work out how to print out:
1 2 3 4 5 4 3 2 1
using only a single for loop, you'd be well on your way.
lex
The hardest part was working "...out how to print out 1 2 3 4 5 4 3 2 1 using only a single for loop"
Needed to go back to my highschool algerbra but it works...
If the OP ever responds, I'd be curious as to what the group thinks of my solution. I won't post it before the OP responds..
--
There are 10 types of people in this world. Those who understand binary and those who don't.
.
- Follow-Ups:
- Re: Nested for loop
- From: Alex Hunsley
- Re: Nested for loop
- References:
- Nested for loop
- From: f2prateek
- Re: Nested for loop
- From: Alex Hunsley
- Nested for loop
- Prev by Date: could i pls get sum hlp w/this???
- Next by Date: Re: could i pls get sum hlp w/this???
- Previous by thread: Re: Nested for loop
- Next by thread: Re: Nested for loop
- Index(es):
Relevant Pages
|