Showing posts with label area of the circle using perl. Show all posts
Showing posts with label area of the circle using perl. Show all posts

Thursday, October 9, 2014

Area of the Circle using Perl

In this article I would like to share with you a sample program to solve the area of the circle by this time I am using Perl as my programming language. The code is very simple and easy to understand.

If you have some questions please send me an email at jakerpomperada@yahoo.com and jakerpomperada@gmail.com.

Thank you very much.


Sample Output of Our Program

Program Listing

## Written By: Mr. Jake R. Pomperada, MAED-IT
## Language : Perl
## Date     : October 9, 2014
#!usr/bin/perl
print "\n\n";
print "\t Area of the Circle";
print "\n\n";
print "Enter the Radius of the Circle? : ";
chomp ($radius=<>);
###########################################
## Formula to solve the area of the Cirle
$area = (3.14 * ($radius ** 2));
###########################################
print "\n\n";
print "The radius of the circle is $radius. \n";
print "The area of the circle is $area.";
print "\n\n";
print "\t\t Thank You For Using This Program.";
print "\n\n";