Sep 5, 2010 at 5:48am UTC
................................... *
...................................* *
..................................* * *
.................................* * * *
................................* * * * *
...............................* * * * * *
This thing should form a triangle, there are NO dots
I need to use the 'for loop', i guess
Anybody to help?
Last edited on Sep 5, 2010 at 5:57am UTC
Sep 5, 2010 at 5:52am UTC
That sounds neat, good luck with it.
Sep 5, 2010 at 12:43pm UTC
What have you got so far?
Sep 6, 2010 at 3:19am UTC
try doing a right angled triangle first which is marginally simpler especially when filled.
Sep 6, 2010 at 12:56pm UTC
@Bazzy,
Indeed I do. I'll try to be more original in the future though, as I've already posted similar code once. I was considering a genetic algorithm, but couldn't come up with a logical fitness function..
Oh well, I guess there will still be plenty of opportunities to do somebodies homework in the most unhelpful possible way...
Sep 6, 2010 at 6:28pm UTC
^^^ I thoroughly enjoy that logic.
Sep 7, 2010 at 12:38am UTC
Lol hamsterman, I think it's safe to say that's the coolest thing I've ever seen.
Sep 7, 2010 at 2:53am UTC
Gah, I hate that exercise. My friend asked me to help him with it and I just brute-forced it all in. :<
Sep 14, 2010 at 6:20pm UTC
hamsterman: There's no for loops in that though.
Sep 14, 2010 at 6:38pm UTC
what do you mean? There are plenty of them. ++++[-/*do something here*/ ]
is a for loop
Sep 14, 2010 at 6:57pm UTC
I'm writing the be-all, end-all ASCII triangle drawing program. You can have the code for free when I'm done. Enabling output will cost £10.
Last edited on Sep 14, 2010 at 6:58pm UTC
Sep 14, 2010 at 7:08pm UTC
hamsterman: Would you kindly explain it to me? This is not a homework question, for me at least.
chrisname: I'd personally be more apt to pay you for the sorce code than anything else.