#!/bin/perl

use strict ;

use warnings ;

#Asking to enter a number.

print "Enter a number!

" ;

#Setting a variable and waiting for user input.

my $choise1 = <STDIN> ;

#Now geting the 2nd number

print "Enter a second number!

" ;

my $choise2 = <STDIN> ;

#Creating the add verible

my $add = plus ( $choise1 , $choise2 ) ;

my $times = add ( $choise1 , $choise2 ) ;

my $subtract = less ( $choise1 , $choise2 ) ;

my $divide = moless ( $choise1 , $choise2 ) ;

#Printing the result

print "This is the addition result: $add

" ;

print "This is the multiplication result: $times

" ;

print "This is the subtract result: $subtract

" ;

print "This is the divided result: $divide

" ;

#This is the script fo the math.

sub add

{

my ( $x , $y ) = @_ ;

my $times = $x * $y ;

return $times ;

}

sub plus

{

my ( $x , $y ) = @_ ;

my $add = $x + $y ;

return $add

}

sub less

{

my ( $x , $y ) = @_ ;

my $subtract = $x - $y ;

return $subtract ;

}

sub moless

{

my ( $x , $y ) = @_ ;

my $divide = $x / $y ;

return $divide ;