Find area using subroutine - Coder's point

Sunday, June 9, 2019

Find area using subroutine

 
sub area { print "Enter the side "; $side=<> ; return ($side * $side); } $totalArea = area(); printf $totalArea;

 OUTPUT:  
 Enter the side 4  
 16  

1 comment: