Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Programming Contest (High School '87)

by damian1301 (Curate)
on May 12, 2001 at 09:29 UTC ( #79915=note: print w/ replies, xml ) Need Help??


in reply to Programming Contest (High School '87)

In the process of trying to make one shorter than the rest, decided to take a slight turn off the path and came up with this. It took me a damn long time to figure out how to get them both the right way and it still isn't up to my standards (and it is long), but I hope you like it anyway. :)

#!/usr/bin/perl -w use strict; for(2,3,4,7,4,3,2){unless($_ == 7){print "\t"," "x($_-3/4),"*"x$_, "\n";}else{print "\n","="x($_+$_+2),"\n";}}print"\n\t\n";for(5,4,3, 2,3,4,5){unless($_ == 2){print "\t"," "x($_-5/4),"*"x$_,"\n";}else{ print "\n"," "x($_+6),"="x($_+14),"\n";}}


Tiptoeing up to a Perl hacker.
Dave AKA damian


Comment on Re: Programming Contest (High School '87)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://79915]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2015-07-28 08:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls