Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Fun With Math

by BronzeWing (Monk)
on Jul 31, 2002 at 17:25 UTC ( #186543=obfuscated: print w/replies, xml ) Need Help??

It might not be hard to read, but I'll bet you can't guess what this'll print before you run it!

#!/usr/bin/perl for my $x (0..4) { $y = sprintf('%.0f', -( 2+( 7/12)) * ($x**4) + +(13+( 8/12)) * ($x**3) + -(26+(11/12)) * ($x**2) + +(36+(10/12)) * ($x**1) + +(80+( 0/12)) * ($x**0) ); print chr($y); }


Be gentle, this is my first one.

-BronzeWing


The Secret to Fortune Cookies in One Line
print join("... in bed", `fortune fortunes` =~ m/^(.*)(\.|\?|\!)$/), "\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: obfuscated [id://186543]
Approved by VSarkiss
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2023-02-07 22:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?