#!/usr/bin/env perl
#input radius
#output Circumfrence of a circle
print "2.11[1])\nPlease enter radius:";
$radius=<STDIN>;
if($radius >= 0){
$out=$radius *2*3.141592654;
print "Circumfrence of a circle is:$out\n";
}
else{
print "Please enter postive real number.";
}
沒有留言:
張貼留言