Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://79915]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2017-12-18 04:12 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (466 votes). Check out past polls.