Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #$usr/bin/perl
- use 5.010;
- use warnings;
- use strict;
- use Math::Trig;
- #ex1 finding area of a circle
- say "Enter the radius";
- chomp(my $radius = <STDIN>);
- if($radius >= 0 ){
- my $area = pi*2*$radius;
- printf "The area of the circle is: %.2f\n", $area;
- }
- else{
- say "The area is 0";
Advertisement
Add Comment
Please, Sign In to add comment