Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

int() function

by geoperl (Novice)
on Oct 24, 2020 at 10:45 UTC ( [id://11123116]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $x1 = (1.15*170)+0.50;
    my $x2 = int($x1);
    print "Number is: $x1, Integer part is: $x2";
    
  2. or download this
    my $x1 = (1.15*150)+0.50;
    my $x2 = int($x1);
    print "\nNumber is: $x1, Integer part is: $x2";
    
  3. or download this
    my $x1 = (1.15*30)+0.50;
    my $x2 = int($x1);
    print "\nNumber is: $x1, Integer part is: $x2";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11123116]
Approved by davies
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-16 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found