#!/usr/bin/perl

print "\nThis program calculate two numbers.\n\n";

print "Input first number (x): ";
$x = <STDIN>;
print"\n";
chomp $x;

print "Input second number (y): ";
$y = <STDIN>;
print"\n";
chomp $y;

$summa = $x + $y;                             # Вычисление суммы двух чисел

$product = $x * $y;                           # Вычисление произведения двух чисел

$difference = 0;                              # Вычисление разности и частного
$division = 1;                                # двух чисел
$prDiff = "x is equally y";

if ( $x > $y)
   {
      $prDiff = "x is larger y";
      $difference = $x - $y;
      $division = $x / $y ;
   }
if ( $x < $y)
   {
      $prDiff = "x is smaller y";
      $difference = $y - $x;
      $division =   $y / $x;
   }

print "$prDiff\n";                             # Печать результатов
print "The summa is $summa\n";
print "The product is $product\n";
print "The difference is $difference\n";
print "The division result is $division\n";